Merge "Allow querying contributions of interwiki usernames"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 7 Mar 2018 04:25:32 +0000 (04:25 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 7 Mar 2018 04:25:32 +0000 (04:25 +0000)
14 files changed:
includes/api/i18n/pt.json
includes/installer/i18n/el.json
languages/i18n/ar.json
languages/i18n/be-tarask.json
languages/i18n/bn.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/el.json
languages/i18n/en.json
languages/i18n/fi.json
languages/i18n/fr.json
tests/parser/TidySupport.php
tests/parser/parserTests.txt

index 669a828..14cf5aa 100644 (file)
@@ -12,7 +12,7 @@
                        "Waldir"
                ]
        },
-       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentation]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailing list]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API Announcements]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bugs & requests]\n</div>\n<strong>Estado:</strong> A API do MediaWiki é uma interface consolidada e estável que é constantemente suportada e melhorada. Enbora tentemos evitá-lo, podemos ocasionalmente realizar alterações disruptivas. Inscreva-se na [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ lista de distribuição mediawiki-api-announce] para receber notificação das atualizações.\n\n<strong>Pedidos incorretos:</strong> Quando são enviados pedidos incorretos à API, será devolvido um cabeçalho HTTP com a chave \"MediaWiki-API-Error\" e depois tanto o valor desse cabeçalho como o código de erro devolvido serão definidos com o mesmo valor. Para mais informação, consulte [[mw:Special:MyLanguage/API:Errors_and_warnings|API:Erros e avisos]].\n\n<p class=\"mw-apisandbox-link\"><strong>Testes:</strong> Para testar facilmente pedidos à API, visite [[Special:ApiSandbox|Testes da API]].</p>",
+       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentação]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de divulgação]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anúncios da API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Defeitos e pedidos]\n</div>\n<strong>Estado:</strong> A API do MediaWiki é uma interface consolidada e estável que é constantemente suportada e melhorada. Embora tentemos evitá-lo, podemos ocasionalmente realizar alterações disruptivas. Inscreva-se na [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ lista de distribuição mediawiki-api-announce] para receber notificações das atualizações.\n\n<strong>Pedidos incorretos:</strong> Quando são enviados pedidos incorretos à API, será devolvido um cabeçalho HTTP com a chave \"MediaWiki-API-Error\" e depois tanto o valor desse cabeçalho como o código de erro devolvido serão definidos com o mesmo valor. Para mais informação, consulte [[mw:Special:MyLanguage/API:Errors_and_warnings|API:Erros e avisos]].\n\n<p class=\"mw-apisandbox-link\"><strong>Testes:</strong> Para testar facilmente pedidos à API, visite [[Special:ApiSandbox|Testes da API]].</p>",
        "apihelp-main-param-action": "A operação a ser realizada.",
        "apihelp-main-param-format": "O formato do resultado.",
        "apihelp-main-param-maxlag": "O atraso máximo pode ser usado quando o MediaWiki é instalado num ''cluster'' de bases de dados replicadas. Para impedir que as operações causem ainda mais atrasos de replicação do sítio, este parâmetro pode fazer o cliente aguardar até que o atraso de replicação seja inferior ao valor especificado. Caso o atraso atual exceda esse valor, o código de erro <samp>maxlag</samp> é devolvido com uma mensagem como <samp>À espera do servidor $host: $lag segundos de atraso</samp>.<br />Consulte [[mw:Special:MyLanguage/Manual:Maxlag_parameter|Manual: Parâmetro maxlag]] para mais informações.",
index 0c93b3a..3a08647 100644 (file)
        "config-page-existingwiki": "Υπάρχον wiki",
        "config-help-restart": "Θέλετε να καταργήσετε όλα τα αποθηκευμένα δεδομένα που έχετε εισαγάγει και να επανεκκινήσετε τη διαδικασία εγκατάστασης;",
        "config-restart": "Ναι, επανεκκίνηση",
-       "config-welcome": "=== Î ÎµÏ\81ιβαλλονÏ\84ικοί Î­Î»ÎµÎ³Ï\87οι ===\nΤÏ\8eÏ\81α Î¸Î± Î³Î¯Î½Î¿Ï\85ν Î²Î±Ï\83ικοί Î­Î»ÎµÎ³Ï\87οι Î³Î¹Î± Î½Î± Î´Î¿Ï\8dμε Î±Î½ Î±Ï\85Ï\84Ï\8c Ï\84ο Ï\80εÏ\81ιβάλλον ÎµÎ¯Î½Î±Î¹ ÎºÎ±Ï\84άλληλο Î³Î¹Î± Ï\84ην ÎµÎ³ÎºÎ±Ï\84άÏ\83Ï\84αÏ\83η Ï\84οÏ\85 MediaWiki.\nÎ\98Ï\85μηθείÏ\84ε Î½Î± Ï\83Ï\85μÏ\80εÏ\81ιλάβεÏ\84ε Î±Ï\85Ï\84έÏ\82 Ï\84ιÏ\82 Ï\80ληÏ\81οÏ\86οÏ\81ίεÏ\82 ÎµÎ¬Î½ Î±Î½Î±Î¶Î·Ï\84ήÏ\83εÏ\84ε Ï\85Ï\80οÏ\83Ï\84ήÏ\81ιξη Î³Î¹Î± Ï\84ο Ï\80Ï\8eÏ\82 να ολοκληρώσετε την εγκατάσταση.",
-       "config-copyright": "=== Πνευματικά δικαιώματα και Όροι ===\n\n$1\n\nΑυτό το πρόγραμμα είναι ελεύθερο λογισμικό• μπορείτε να το αναδιανείμετε ή και να το τροποποιήσετε υπό τους όρους της Γενικής Άδειας Δημόσιας Χρήσης GNU, όπως αυτή δημοσιεύεται από το Ίδρυμα Ελεύθερου Λογισμικού• είτε της έκδοσης 2 της Άδειας, είτε (κατά την επιλογή σας) οποιασδήποτε μεταγενέστερης έκδοσης.\n\nΑυτό το πρόγραμμα διανέμεται με την ελπίδα ότι θα είναι χρήσιμο, αλλά <strong>χωρίς καμία εγγύηση</strong>• χωρίς καν την υπονοούμενη εγγύηση της <strong>εμπορευσιμότητας</strong> ή της <strong>καταλληλοτότητας για συγκεκριμένο σκοπό</strong>.\nΔείτε την Γενική Άδεια Δημόσιας Χρήσης GNU για περισσότερες λεπτομέρειες.\n\nΘα πρέπει να έχετε λάβει <doclink href=\"Copying\">ένα αντίγραφο της Γενικής Άδειας Δημόσιας Χρήσης GNU</doclink> μαζί με αυτό το πρόγραμμα• αν όχι, γράψτε στο Free Software Foundation,\n51 Franklin Street, Fifth Floor,\nBoston, MA 02110-1335\nUSA ή [https://www.gnu.org/copyleft/gpl.html διαβάστε online].",
+       "config-welcome": "=== Î\88λεγÏ\87οι Ï\84οÏ\85 Ï\80εÏ\81ιβάλλονÏ\84οÏ\82 ===\nΤÏ\8eÏ\81α Î¸Î± Î³Î¯Î½Î¿Ï\85ν Î²Î±Ï\83ικοί Î­Î»ÎµÎ³Ï\87οι Î³Î¹Î± Î½Î± Î´Î¿Ï\8dμε Î±Î½ Î±Ï\85Ï\84Ï\8c Ï\84ο Ï\80εÏ\81ιβάλλον ÎµÎ¯Î½Î±Î¹ ÎºÎ±Ï\84άλληλο Î³Î¹Î± Ï\84ην ÎµÎ³ÎºÎ±Ï\84άÏ\83Ï\84αÏ\83η Ï\84οÏ\85 MediaWiki.\nÎ\98Ï\85μηθείÏ\84ε Î½Î± Ï\83Ï\85μÏ\80εÏ\81ιλάβεÏ\84ε Î±Ï\85Ï\84έÏ\82 Ï\84ιÏ\82 Ï\80ληÏ\81οÏ\86οÏ\81ίεÏ\82 ÎµÎ¬Î½ Î±Î½Î±Î¶Î·Ï\84ήÏ\83εÏ\84ε Ï\85Ï\80οÏ\83Ï\84ήÏ\81ιξη Î³Î¹Î± να ολοκληρώσετε την εγκατάσταση.",
+       "config-copyright": "=== Πνευματικά δικαιώματα και όροι ===\n\n$1\n\nΑυτό το πρόγραμμα είναι ελεύθερο λογισμικό· μπορείτε να το αναδιανείμετε ή/και να το τροποποιήσετε υπό τους όρους της Γενικής Άδειας Δημόσιας Χρήσης GNU, όπως αυτή δημοσιεύεται από το Ίδρυμα Ελεύθερου Λογισμικού· είτε της έκδοσης 2 της Άδειας, είτε (κατ' επιλογήν σας) οποιασδήποτε μεταγενέστερης έκδοσης.\n\nΑυτό το πρόγραμμα διανέμεται με την ελπίδα ότι θα είναι χρήσιμο, αλλά <strong>χωρίς καμία εγγύηση</strong>· χωρίς καν τη σιωπηρή εγγύηση της <strong>εμπορευσιμότητας</strong> ή <strong>καταλληλότητας για συγκεκριμένο σκοπό</strong>.\nΔείτε τη Γενική Άδεια Δημόσιας Χρήσης GNU για περισσότερες λεπτομέρειες.\n\nΘα πρέπει να έχετε παραλάβει <doclink href=\"Copying\">ένα αντίγραφο της Γενικής Άδειας Δημόσιας Χρήσης GNU</doclink> μαζί με αυτό το πρόγραμμα· αν όχι, στείλτε ένα γράμμα στο Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA, ή [https://www.gnu.org/copyleft/gpl.html διαβάστε το διαδικτυακά].",
        "config-sidebar": "* [https://www.mediawiki.org Αρχική MediaWiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Οδηγός Χρήστη]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Οδηγός Διαχειριστή]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Συχνές ερωτήσεις]\n----\n* <doclink href=\"Readme\">Διαβάστε με</doclink>\n* <doclink href=\"ReleaseNotes\">Σημειώσεις έκδοσης</doclink>\n* <doclink href=\"Copying\">Αντιγραφή</doclink>\n* <doclink href=\"UpgradeDoc\">Αναβάθμιση</doclink>",
        "config-env-good": "Το περιβάλλον έχει ελεγχθεί.\nΜπορείτε να εγκαταστήσετε το MediaWiki.",
        "config-env-bad": "Το περιβάλλον έχει ελεγχθεί.\nΔεν μπορείτε να εγκαταστήσετε το MediaWiki.",
        "config-env-php": "H PHP $1 είναι εγκατεστημένη.",
        "config-env-hhvm": "Το HHVM $1 είναι εγκατεστημένο.",
-       "config-unicode-using-intl": "Χρησιμοποιώντας την [https://pecl.php.net/intl επέκταση intl PECL] για κανονικοποίηση Unicode.",
+       "config-unicode-using-intl": "Χρησιμοποιείται η [https://pecl.php.net/intl επέκταση intl PECL] για κανονικοποίηση Unicode.",
        "config-unicode-pure-php-warning": "<strong>Προειδοποίηση:</strong> Η [https://pecl.php.net/intl επέκταση intl PECL] δεν είναι διαθέσιμη για να χειριστεί την κανονικοποίηση Unicode, επιστρέφουμε στην αργή αμιγώς PHP εφαρμογή.\nΕάν λειτουργείτε έναν ιστότοπο υψηλής επισκεψιμότητας, θα πρέπει να ρίξετε μια ματιά στην [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations κανονικοποίηση Unicode].",
        "config-no-db": "Δεν βρέθηκε κάποιο κατάλληλο πρόγραμμα οδήγησης βάσης δεδομένων! Θα πρέπει να εγκαταστήσετε ένα πρόγραμμα οδήγησης βάσης δεδομένων για  PHP.\nΟ παρακάτω {{PLURAL:$2|τύπος βάσης δεδομένων|τύποι βάσεων δεδομένων}} υποστηρίζονται: $1.\n\nΑν κάνετε compile την PHP μόνοι σας, ρυθμίστε ξανά τις παραμέτρους με κάποιον ενεργοποιημένο εξυπηρετητή βάσεων  δεδομένων, για παράδειγμα, χρησιμοποιώντας την εντολή <code>./configure --with-mysqli</code>.\nΕάν έχετε εγκαταστήσει την PHP από κάποιο πακέτο στο Debian ή στο Ubuntu, τότε θα πρέπει να εγκαταστήσετε επίσης, για παράδειγμα, το πακέτο <code>php5-mysql</code>.",
        "config-outdated-sqlite": "<strong>Προειδοποίηση:</strong> έχετε την SQLite έκδοση $1, που είναι χαμηλότερη από την ελάχιστη απαιτούμενη έκδοση $2. Η SQLite δεν θα είναι διαθέσιμη.",
        "config-apc": "Το [http://www.php.net/apc APC] είναι εγκατεστημένο",
        "config-wincache": "[https://www.iis.net/download/WinCacheForPhp Το WinCache] είναι εγκατεστημένο",
        "config-diff3-bad": "Το GNU diff3 δεν βρέθηκε.",
-       "config-git": "Βρέθηκε η Git έκδοση λογισμικού ελέγχου: <code>$1</code>.",
-       "config-git-bad": "Î\97 Git Î­ÎºÎ´Î¿Ï\83η Ï\84οÏ\85 Î»Î¿Î³Î¹Ï\83μικοÏ\8d ÎµÎ»Î­Î³Ï\87οÏ\85 δεν βρέθηκε.",
+       "config-git": "Βρέθηκε το λογισμικό ελέγχου εκδόσεων Git: <code>$1</code>.",
+       "config-git-bad": "Το Î»Î¿Î³Î¹Ï\83μικÏ\8c ÎµÎ»Î­Î³Ï\87οÏ\85 ÎµÎºÎ´Ï\8cÏ\83εÏ\89ν Git δεν βρέθηκε.",
        "config-no-uri": "<strong>Σφάλμα:</strong> Δεν ήταν δυνατό να καθοριστεί το τρέχον URI.\nΗ εγκατάσταση ματαιώθηκε.",
-       "config-using-server": "Χρησιμοποιείται το όνομα διακομιστή \"<nowiki>$1</nowiki>\".",
-       "config-using-uri": "Χρησιμοποιώντας την διεύθυνση URL του διακομιστή \"<nowiki>$1$2</nowiki>\".",
+       "config-using-server": "Χρησιμοποιείται το όνομα διακομιστή «<nowiki>$1</nowiki>».",
+       "config-using-uri": "Χρησιμοποιείται η διεύθυνση URL του διακομιστή «<nowiki>$1$2</nowiki>».",
+       "config-uploads-not-safe": "<strong>Προειδοποίηση:</strong> Ο προεπιλεγμένος σας κατάλογος για ανέβασμα <code>$1</code> είναι ευάλωτος σε εκτέλεση αυθαίρετων σεναρίων ενεργειών.\nΑν και το MediaWiki ελέγχει για απειλές ασφαλείας όλα τα αρχεία που ανεβαίνουν, συνιστάται ιδιαίτερα να [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Security#Upload_security κλείσετε αυτό το κενό ασφαλείας] πριν ενεργοποιήσετε το ανέβασμα αρχείων.",
+       "config-no-cli-uploads-check": "<strong>Προειδοποίηση:</strong> Ο προεπιλεγμένος σας κατάλογος για ανέβασμα (<code>$1</code>) δεν έχει ελεγχθεί για ευπάθεια σε εκτέλεση αυθαίρετων σεναρίων ενεργειών κατά τη διάρκεια της εγκατάστασης μέσω γραμμής εντολών.",
        "config-brokenlibxml": "Το σύστημά σας έχει έναν συνδυασμό εκδόσεων της PHP και της libxml2 που είναι προβληματικός και μπορεί να προκαλέσει καταστροφή κρυμμένων στοιχείων στο MediaWiki και σε άλλες εφαρμογές ιστού.\nΑναβαθμίστε σε libxml2 2.7.3 ή μεταγενέστερη έκδοση ([https://bugs.php.net/bug.php?id=45996 bug που έχει καταχωριστεί για την PHP]).\nΗ εγκατάσταση ματαιώθηκε.",
        "config-db-type": "Τύπος βάσης δεδομένων:",
        "config-db-host": "Φιλοξενία βάσης δεδομένων:",
+       "config-db-host-help": "Εάν ο διακομιστής βάσης δεδομένων σας βρίσκεται σε διαφορετικό διακομιστή, εισαγάγετε εδώ το όνομα του κεντρικού υπολογιστή ή τη διεύθυνση IP.\n\nΕάν χρησιμοποιείτε μοιραζόμενη φιλοξενία του ιστοτόπου σας, ο πάροχος φιλοξενίας σας θα πρέπει να σας δίνει το σωστό όνομα κεντρικού υπολογιστή στην τεκμηρίωση του.\n\nΕάν εγκαθιστάτε σε διακομιστή Windows και χρησιμοποιείτε MySQL, το «localhost» μπορεί να μην λειτουργεί ως όνομα διακομιστή. Εάν δεν λειτουργεί, δοκιμάστε «127.0.0.1» ως τοπική διεύθυνση IP.\n\nΕάν χρησιμοποιείτε PostgreSQL, αφήστε αυτό το πεδίο κενό για να συνδεθείτε μέσω υποδοχής Unix.",
        "config-db-host-oracle": "Βάση δεδομένων TNS:",
        "config-db-wiki-settings": "Αναγνώριση αυτού του wiki",
        "config-db-name": "Όνομα βάσης δεδομένων:",
-       "config-db-name-help": "Επιλέξτε ένα όνομα που ταιριάζει στο  wiki σας. Δεν πρέπει να περιέχει κενά διαστήματα.\n\nΕάν χρησιμοποιείτε κοινόχρηστο web hosting, ο πάροχος φιλοξενίας είτε θα σας δώσει ένα συγκεκριμένο όνομα βάσης δεδομένων για να χρησιμοποιήσετε ή θα σας δώσει τη δυνατότητα να δημιουργήσετε βάσεις δεδομένων μέσω ενός πίνακα ελέγχου.",
+       "config-db-name-help": "Επιλέξτε όνομα που να χαρακτηρίζει το wiki σας. Δεν πρέπει να περιέχει κενά διαστήματα.\n\nΕάν χρησιμοποιείτε μοιραζόμενη φιλοξενία του ιστοτόπου σας, ο πάροχος φιλοξενίας σας είτε θα σας δίνει να χρησιμοποιήσετε ένα συγκεκριμένο όνομα βάσης δεδομένων ή θα σας δίνει τη δυνατότητα να δημιουργείτε βάσεις δεδομένων μέσω κάποιου πίνακα ελέγχου.",
        "config-db-name-oracle": "Σχήμα βάσης δεδομένων:",
        "config-db-install-account": "Λογαριασμός χρήστη για την εγκατάσταση",
        "config-db-username": "Όνομα χρήστη βάσης δεδομένων:",
-       "config-db-password": "Κωδικός πρόσβασης βάσης δεδομένων:",
+       "config-db-password": "Συνθηματικό βάσης δεδομένων:",
+       "config-db-install-username": "Εισαγάγετε το όνομα χρήστη που θα χρησιμοποιηθεί για τη σύνδεση στη βάση δεδομένων κατά τη διάρκεια της διαδικασίας εγκατάστασης.\nΑυτό δεν είναι το όνομα χρήστη του λογαριασμού του MediaWiki· αυτό είναι το όνομα χρήστη για τη βάση δεδομένων σας.",
+       "config-db-install-password": "Εισαγάγετε το συνθηματικό που θα χρησιμοποιηθεί για τη σύνδεση στη βάση δεδομένων κατά τη διάρκεια της διαδικασίας εγκατάστασης.\nΑυτό δεν είναι το συνθηματικό του λογαριασμού του MediaWiki· αυτό είναι το συνθηματικό για τη βάση δεδομένων σας.",
        "config-db-install-help": "Εισαγάγετε το όνομα χρήστη και τον κωδικό πρόσβασης που θα χρησιμοποιηθεί για τη σύνδεση με τη βάση δεδομένων κατά τη διάρκεια της διαδικασίας εγκατάστασης.",
        "config-db-account-lock": "Χρησιμοποιήστε το ίδιο όνομα χρήστη και συνθηματικό κατά τη διάρκεια της κανονικής λειτουργίας",
        "config-db-wiki-account": "Λογαριασμός χρήστη για κανονική λειτουργία",
        "config-db-wiki-help": "Πληκτρολογήστε το όνομα χρήστη και τον κωδικό πρόσβασης που θα χρησιμοποιηθεί για τη σύνδεση με τη βάση δεδομένων κατά τη διάρκεια της κανονικής λειτουργίας του wiki.\nΕάν ο λογαριασμός δεν υπάρχει και o λογαριασμός εγκατάστασης  έχει επαρκή δικαιώματα, αυτός ο λογαριασμός χρήστη θα δημιουργηθεί με τα ελάχιστα δικαιώματα που απαιτούνται για τη λειτουργία του wiki.",
        "config-db-prefix": "Πρόθεμα πίνακα βάσης δεδομένων:",
-       "config-db-prefix-help": "Εάν χρειάζεται να μοιραστείτε μία βάση δεδομένων μεταξύ πολλαπλών wikis, ή μεταξύ του MediaWiki και μιας άλλης web εφαρμογής, μπορείτε να προσθέσετε ένα πρόθεμα σε όλα τα ονόματα πίνακα για να αποφεύγονται οι διενέξεις.\nΜην χρησιμοποιείτε κενά διαστήματα.\n\nΑυτό το πεδίο αφήνεται συνήθως κενό.",
+       "config-db-prefix-help": "Εάν χρειάζεται να μοιραστείτε μία βάση δεδομένων μεταξύ πολλαπλών wiki, ή μεταξύ του MediaWiki και μιας άλλης εφαρμογής Ιστού, μπορείτε να προσθέσετε ένα πρόθεμα σε όλα τα ονόματα πινάκων για να αποφεύγονται οι διενέξεις.\nΜην χρησιμοποιείτε κενά διαστήματα.\n\nΑυτό το πεδίο αφήνεται συνήθως κενό.",
        "config-mysql-old": "Απαιτείται Microsoft SQL Server $1 ή νεότερο. Εσείς έχετε $2.",
        "config-db-port": "Θύρα βάσης δεδομένων:",
        "config-db-schema": "Σχήμα για MediaWiki:",
        "config-type-oracle": "Oracle",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "To MediaWiki υποστηρίζει τα ακόλουθα συστήματα βάσεων δεδομένων:\n\n$1\n\nΑν δεν εμφανίζεται παρακάτω το σύστημα βάσης δεδομένων που θέλετε να χρησιμοποιήσετε, τότε ακολουθήστε τις οδηγίες στον παραπάνω σύνδεσμο για να ενεργοποιήσετε την υποστήριξη.",
+       "config-dbsupport-mysql": "* Η [{{int:version-db-mysql-url}} MySQL] είναι ο πρωταρχικός στόχος για το MediaWiki και υποστηρίζεται καλύτερα. Το MediaWiki συνεργάζεται επίσης με τη [{{int:version-db-mariadb-url}} MariaDB] και το [{{int:version-db-percona-url}} διακομιστή Percona], που είναι όλα συμβατά με MySQL. ([http://www.php.net/manual/en/mysqli.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη MySQL])",
+       "config-dbsupport-postgres": "* Η [{{int:version-db-postgres-url}} PostgreSQL] είναι δημοφιλές σύστημα βάσης δεδομένων ανοικτού κώδικα ως εναλλακτική της MySQL. ([http://www.php.net/manual/en/pgsql.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη PostgreSQL])",
+       "config-dbsupport-sqlite": "* Η [{{int:version-db-sqlite-url}} SQLite] είναι ένα ελαφρύ σύστημα βάσης δεδομένων που υποστηρίζεται πολύ καλά. ([http://www.php.net/manual/en/pdo.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη SQLite], χρησιμοποιεί PDO)",
+       "config-dbsupport-oracle": "* Η [{{int:version-db-oracle-url}} Oracle] είναι εμπορική βάση δεδομένων για επιχειρήσεις. ([http://www.php.net/manual/en/oci8.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη OCI8])",
+       "config-dbsupport-mssql": "* Ο [{{int:version-db-mssql-url}} Microsoft SQL Server] είναι εμπορική βάση δεδομένων για επιχειρήσεις που λειτουργεί σε Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη SQLSRV])",
        "config-header-mysql": "Ρυθμίσεις MySQL",
        "config-header-postgres": "Ρυθμίσεις PostgreSQL",
        "config-header-sqlite": "Ρυθμίσεις SQLite",
        "config-sqlite-cant-create-db": "Δεν ήταν δυνατή η δημιουργία του αρχείου βάσης δεδομένων <code>$1</code>.",
        "config-upgrade-done-no-regenerate": "Η αναβάθμιση ολοκληρώθηκε.\n\nΜπορείτε τώρα να [$1 ξεκινήσετε να χρησιμοποιείτε το wiki σας].",
        "config-regenerate": "Αναδημιουργία LocalSettings.php →",
-       "config-db-web-account": "Î\9bογαÏ\81ιαÏ\83μÏ\8cÏ\82 Î²Î¬Ï\83ηÏ\82 Î´ÎµÎ´Î¿Î¼Î­Î½Ï\89ν Î³Î¹Î± Ï\80Ï\81Ï\8cÏ\83βαÏ\83η Î¹στού",
+       "config-db-web-account": "Î\9bογαÏ\81ιαÏ\83μÏ\8cÏ\82 Î²Î¬Ï\83ηÏ\82 Î´ÎµÎ´Î¿Î¼Î­Î½Ï\89ν Î³Î¹Î± Ï\80Ï\81Ï\8cÏ\83βαÏ\83η Î\99στού",
        "config-db-web-account-same": "Χρήση του ίδιου λογαριασμού για την εγκατάσταση",
        "config-mysql-engine": "Μηχανή αποθήκευσης:",
        "config-mysql-innodb": "InnoDB",
        "config-mysql-myisam": "MyISAM",
+       "config-mysql-engine-help": "Το <strong>InnoDB</strong> είναι σχεδόν πάντα η καλύτερη επιλογή, αφού έχει καλή υποστήριξη ταυτόχρονης λειτουργίας.\n\nΤο <strong>MyISAM</strong> μπορεί να είναι ταχύτερο σε εγκαταστάσεις του ενός χρήστη ή μόνο ανάγνωσης. \nΟι βάσεις δεδομένων MyISAM τείνουν να φθείρονται συχνότερα από τις βάσεις δεδομένων InnoDB.",
        "config-mysql-charset": "Σύνολο χαρακτήρων βάσης δεδομένων:",
        "config-mysql-binary": "Δυαδικό",
        "config-mysql-utf8": "UTF-8",
+       "config-mysql-charset-help": "Σε <strong>λειτουργία δυαδικού</strong>, το MediaWiki αποθηκεύει κείμενο UTF-8 στη βάση δεδομένων σε δυαδικά πεδία.\nΑυτό είναι πιο αποτελεσματικό από τη λειτουργία UTF-8 της MySQL και σας επιτρέπει να χρησιμοποιείτε ολόκληρο το φάσμα των χαρακτήρων Unicode.\n\nΣε <strong>λειτουργία UTF-8</strong>, η MySQL θα γνωρίζει σε ποιο σύνολο χαρακτήρων ανήκουν τα δεδομένα σας και θα μπορεί να τα παρουσιάζει και να τα μετατρέπει κατάλληλα, αλλά δεν θα σας επιτρέπει να αποθηκεύετε χαρακτήρες πάνω από το [https://en.wikipedia.org/wiki/Mapping_of_Unicode_character_planes βασικό πολύγλωσσο επίπεδο].",
        "config-mssql-auth": "Τύπος ελέγχου ταυτότητας:",
        "config-mssql-sqlauth": "Έλεγχος ταυτότητας του SQL Server",
        "config-mssql-windowsauth": "Έλεγχος ταυτότητας των Windows",
        "config-ns-site-name": "Ίδιο με το όνομα του wiki: $1",
        "config-ns-other": "Άλλο (προσδιορίστε)",
        "config-ns-other-default": "ΤοWikiμου",
+       "config-project-namespace-help": "Ακολουθώντας το παράδειγμα της Βικιπαίδειας, πολλά wiki διατηρούν τις σελίδες πολιτικής τους χωριστά από τις σελίδες περιεχομένου τους, σε έναν '''ονοματοχώρο έργου'''.\nΌλοι οι τίτλοι σελίδων σε αυτόν τον ονοματοχώρο ξεκινούν με συγκεκριμένο πρόθεμα, το οποίο μπορείτε να ορίσετε εδώ.\nΣυνήθως, αυτό το πρόθεμα παράγεται από το όνομα του wiki, αλλά δεν μπορεί να περιέχει χαρακτήρες στίξης όπως «#» ή «:».",
        "config-admin-box": "Λογαριασμός διαχειριστή",
        "config-admin-name": "Το όνομα χρήστη σας:",
        "config-admin-password": "Κωδικός πρόσβασης:",
        "config-admin-password-confirm": "Επανάληψη κωδικού πρόσβασης:",
+       "config-admin-help": "Εισαγάγετε το προτιμώμενο όνομα χρήστη εδώ, για παράδειγμα «Γιάννης Ιστολόγιος». \nΑυτό είναι το όνομα που θα χρησιμοποιείτε για να συνδέεστε στο wiki.",
        "config-admin-name-blank": "Εισαγάγετε όνομα χρήστη διαχειριστή.",
        "config-admin-name-invalid": "Το συγκεκριμένο όνομα χρήστη  \"<nowiki>$1</nowiki>\" δεν είναι έγκυρο. Δώστε ένα διαφορετικό όνομα χρήστη.",
        "config-admin-password-blank": "Εισαγάγετε κωδικό για το λογαριασμό διαχειριστή.",
        "config-admin-password-mismatch": "Οι δύο κωδικοί πρόσβασης που εισηγάγατε δεν ταιριάζουν.",
        "config-admin-email": "Διεύθυνση ηλεκτρονικού ταχυδρομείου:",
+       "config-admin-email-help": "Εισαγάγετε μια διεύθυνση ηλεκτρονικού ταχυδρομείου εδώ για να μπορείτε να λαμβάνετε μηνύματα ηλεκτρονικού ταχυδρομείου από άλλους χρήστες στο wiki, να επαναφέρετε το συνθηματικό σας και να ενημερώνεστε για τις αλλαγές σε σελίδες που βρίσκονται στη λίστα παρακολούθησής σας. Μπορείτε να αφήσετε αυτό το πεδίο κενό.",
        "config-admin-error-bademail": "Έχετε εισαγάγει μη έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου.",
+       "config-subscribe": "Εγγραφή στη [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce λίστα αλληλογραφίας ανακοινώσεων σχετικά με νέες κυκλοφορίες].",
+       "config-subscribe-help": "Πρόκειται για μια λίστα αλληλογραφίας χαμηλού όγκου που χρησιμοποιείται για ανακοινώσεις σχετικά με νέες κυκλοφορίες, συμπεριλαμβανομένων σημαντικών ανακοινώσεων ασφαλείας. \nΚαλό θα ήταν να εγγραφείτε σε αυτήν και να ενημερώνετε την εγκατάσταση του MediaWiki όταν βγαίνουν νέες εκδόσεις.",
+       "config-pingback": "Διαμοιρασμός δεδομένων σχετικά με αυτήν την εγκατάσταση με τους προγραμματιστές του MediaWiki.",
+       "config-pingback-help": "Αν επιλέξετε αυτή την επιλογή, το MediaWiki θα στέλνει περιοδικά στο https://www.mediawiki.org βασικά δεδομένα σχετικά με αυτήν την υλοποίηση του MediaWiki. Αυτά τα δεδομένα περιλαμβάνουν, για παράδειγμα, τον τύπο του συστήματος, την έκδοση PHP και την επιλεγμένη βάση δεδομένων. Το Ίδρυμα Wikimedia μοιράζεται αυτά τα δεδομένα με τους προγραμματιστές του MediaWiki για να καθοδηγήσει τις μελλοντικές προσπάθειες ανάπτυξης. θα αποσταλούν τα ακόλουθα δεδομένα σχετικά με το σύστημά σας:\n<pre>$1</pre>",
+       "config-almost-done": "Έχετε σχεδόν τελειώσει!\nΤώρα μπορείτε να παραλείψετε την υπόλοιπη διαμόρφωση και να εγκαταστήσετε το wiki αμέσως τώρα.",
        "config-optional-continue": "Να ερωτηθώ περισσότερες ερωτήσεις.",
-       "config-optional-skip": "Î\92αÏ\81έθηκα Î®Î´Î·, Î±Ï\80λά ÎµÎ³ÎºÎ±Ï\84αÏ\83Ï\84ήÏ\83Ï\84ε το wiki.",
+       "config-optional-skip": "Î\92αÏ\81έθηκα Î®Î´Î·, Î½Î± ÎµÎ³ÎºÎ±Ï\84αÏ\83Ï\84αθεί Î±Ï\80λά το wiki.",
        "config-profile": "Προφίλ δικαιωμάτων χρήστη:",
-       "config-profile-wiki": "Ανοικτό wiki",
-       "config-profile-no-anon": "Απαιτείται η δημιουργία λογαριασμού",
-       "config-profile-fishbowl": "Εξουσιοδοτημένοι συντάκτες μόνο",
-       "config-profile-private": "Ιδιωτικό wiki",
+       "config-profile-wiki": "ανοικτό wiki",
+       "config-profile-no-anon": "απαιτούμενη δημιουργία λογαριασμού",
+       "config-profile-fishbowl": "εξουσιοδοτημένοι συντάκτες μόνο",
+       "config-profile-private": "ιδιωτικό wiki",
+       "config-profile-help": "Τα wiki λειτουργούν καλύτερα όταν αφήνετε να τα επεξεργαστούν όσο το δυνατόν περισσότεροι άνθρωποι.\nΣτο MediaWiki, είναι εύκολο να ελέγξετε τις πρόσφατες αλλαγές και να επαναφέρετε τυχόν ζημιές που προκαλούνται από αρχάριους ή κακόβουλους χρήστες.\n\nΩστόσο, πολλοί έχουν βρει το MediaWiki χρήσιμο σε ένα ευρύ φάσμα ρόλων και μερικές φορές δεν είναι εύκολο να πείσουμε τους πάντες για τα οφέλη του τρόπου του wiki.\nΥπάρχει λοιπόν επιλογή.\n\nΤο μοντέλο <strong>{{int:config-profile-wiki}}</strong> επιτρέπει σε οποιονδήποτε να επεξεργαστεί, χωρίς καν να συνδεθεί. Ένα wiki με <strong>{{int:config-profile-no-anon}}</strong> παρέχει μεγαλύτερη λογοδοσία, αλλά μπορεί να αποτρέψει τους περιστασιακούς συνεισφέροντες.\n\nΤο σενάριο <strong>{{int:config-profile-fishbowl}}</strong> επιτρέπει στους εγκεκριμένους χρήστες να επεξεργαστούν, αλλά το κοινό μπορεί να δει τις σελίδες, συμπεριλαμβανομένου του ιστορικού. \nΈνα <strong>{{int:config-profile-private}}</strong> επιτρέπει μόνο στους εγκεκριμένους χρήστες να προβάλλουν σελίδες, και μόνο στους ίδιους να επεξεργαστούν.\n\nΠιο πολύπλοκες ρυθμίσεις δικαιωμάτων χρήστη είναι διαθέσιμες μετά την εγκατάσταση, δείτε τη [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:User_rights σχετική μη αυτόματη καταχώριση].",
        "config-license": "Πνευματικά δικαιώματα και άδεια χρήσης:",
        "config-license-none": "Χωρίς άδεια χρήσης στο υποσέλιδο",
        "config-license-cc-by-sa": "Creative Commons Αναφορά Δημιουργού-Παρόμοια Διανομή",
        "config-license-gfdl": "Αδειοδότηση Ελεύθερης Τεκμηρίωσης GNU 1.3 ή μεταγενέστερη",
        "config-license-pd": "Κοινό Κτήμα",
        "config-license-cc-choose": "Επιλέξτε μια προσαρμοσμένη άδεια Creative Commons",
+       "config-license-help": "Πολλά δημόσια wiki βάζουν όλες τις συνεισφορές υπό [https://freedomdefined.org/Definition ελεύθερη άδεια].\nΑυτό βοηθά να δημιουργηθεί μια αίσθηση κοινοτικής ιδιοκτησίας και ενθαρρύνει τη μακροχρόνια συνεισφορά.\nΔεν είναι γενικά απαραίτητο για ένα ιδιωτικό ή εταιρικό wiki.\n\nΑν θέλετε να μπορείτε να χρησιμοποιείτε κείμενο από τη Βικιπαίδεια και αν θέλετε να μπορεί η Βικιπαίδεια να δεχτεί κείμενο που αντιγράφεται από το wiki σας, θα πρέπει να επιλέξετε <strong>{{int:config-license-cc-by-sa}}</strong>.\n\nΗ Βικιπαίδεια χρησιμοποιούσε παλιά την Άδεια Ελεύθερης Τεκμηρίωσης GNU (GFDL).\nΗ GFDL είναι μια έγκυρη άδεια, αλλά είναι δύσκολο να κατανοηθεί.\nΕίναι επίσης δύσκολο να επαναχρησιμοποιηθεί το περιεχόμενο που έχει χορηγηθεί βάσει της GFDL.",
        "config-email-settings": "Ρυθμίσεις ηλεκτρονικού ταχυδρομείου",
+       "config-enable-email": "Ενεργοποίηση εξερχόμενου ηλεκτρονικού ταχυδρομείου",
+       "config-enable-email-help": "Αν θέλετε να λειτουργήσει το ηλεκτρονικό ταχυδρομείο, οι [http://www.php.net/manual/en/mail.configuration.php ρυθμίσεις αλληλογραφίας της PHP] πρέπει να ρυθμιστούν σωστά.\nΑν δεν θέλετε καθόλου λειτουργίες ηλεκτρονικού ταχυδρομείου, μπορείτε να τις απενεργοποιήσετε εδώ.",
        "config-email-user": "Ενεργοποίηση ηλεκτρονικού ταχυδρομείου από χρήστη σε χρήστη",
+       "config-email-user-help": "Να επιτρέπεται σε όλους τους χρήστες να στέλνουν ο ένας στον άλλον μηνύματα ηλεκτρονικού ταχυδρομείου εάν το έχουν ενεργοποιήσει στις προτιμήσεις τους.",
        "config-email-usertalk": "Ενεργοποίηση ειδοποίησης σελίδας συζήτησης χρήστη",
+       "config-email-usertalk-help": "Να επιτρέπεται στους χρήστες να λαμβάνουν ειδοποιήσεις σχετικά με τις αλλαγές στις σελίδες συζήτησης χρήστη, εάν το έχουν ενεργοποιήσει στις προτιμήσεις τους.",
        "config-email-watchlist": "Ενεργοποίηση ειδοποίησης λίστας παρακολούθησης",
-       "config-email-watchlist-help": "Î\95Ï\80ιÏ\84Ï\81έÏ\88Ï\84ε στους χρήστες να λαμβάνουν ειδοποιήσεις για τις σελίδες που παρακολουθούν αν το έχουν ενεργοποιήσει στις προτιμήσεις τους.",
+       "config-email-watchlist-help": "Î\9dα ÎµÏ\80ιÏ\84Ï\81έÏ\80εÏ\84αι στους χρήστες να λαμβάνουν ειδοποιήσεις για τις σελίδες που παρακολουθούν αν το έχουν ενεργοποιήσει στις προτιμήσεις τους.",
        "config-email-auth": "Ενεργοποίηση ταυτοποίησης μέσω ηλεκτρονικού ταχυδρομείου",
+       "config-email-auth-help": "Εάν αυτή η επιλογή είναι ενεργοποιημένη, οι χρήστες πρέπει να επιβεβαιώσουν τη διεύθυνση ηλεκτρονικού ταχυδρομείου τους χρησιμοποιώντας ένα σύνδεσμο που τους αποστέλλεται όποτε την καθορίζουν ή την αλλάζουν.\nΜόνο οι ταυτοποιημένες διευθύνσεις ηλεκτρονικού ταχυδρομείου μπορούν να λαμβάνουν μηνύματα ηλεκτρονικού ταχυδρομείου από άλλους χρήστες ή να αλλάζουν μηνύματα ειδοποίησης.\nΟ καθορισμός αυτής της επιλογής <strong>συνιστάται</strong> για δημόσια wiki λόγω πιθανής κατάχρησης των λειτουργιών του ηλεκτρονικού ταχυδρομείου.",
        "config-email-sender": "Διεύθυνση ηλεκτρονικού ταχυδρομείου επιστροφής:",
+       "config-email-sender-help": "Εισαγάγετε τη διεύθυνση ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί ως διεύθυνση επιστροφής στο εξερχόμενο ηλεκτρονικό ταχυδρομείο.\nΕκεί είναι που θα στέλνονται οι επιστροφές.\nΠολλοί διακομιστές αλληλογραφίας απαιτούν τουλάχιστον το τμήμα ονόματος τομέα να είναι έγκυρο.",
        "config-upload-settings": "Ανέβασμα εικόνων και άλλων αρχείων",
-       "config-upload-enable": "Î\95νεÏ\81γοÏ\80οιήÏ\83Ï\84ε Ï\84ο Î±Î½Î­Î²Î±Ï\83μα αρχείων",
-       "config-upload-help": "Το ανέβασμα αρχείων εκθέτει πιθανώς το διακομιστή σας σε κινδύνους ασφαλείας.\nΓια περισσότερες πληροφορίες, διαβάστε την [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Security ενότητα περί ασφάλειας] στο εγχειρίδιο.\n\nΓια να ενεργοποιήσετε το ανέβασμα αρχείων, αλλάξτε την κατάσταση του υποκαταλόγου <code>εικόνες</code> που βρίσκεται κάτω από τον ριζικό κατάλογο του MediaWiki έτσι ώστε ο διακομιστής ιστού να μπορεί να γράψει σε αυτόν.\nΣτη συνέχεια ενεργοποιήσετε αυτή την επιλογή.",
+       "config-upload-enable": "Î\95νεÏ\81γοÏ\80οίηÏ\83η Î±Î½ÎµÎ²Î¬Ï\83μαÏ\84οÏ\82 αρχείων",
+       "config-upload-help": "Το ανέβασμα αρχείων εκθέτει πιθανώς το διακομιστή σας σε κινδύνους ασφαλείας.\nΓια περισσότερες πληροφορίες, διαβάστε την [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Security ενότητα περί ασφάλειας] στο εγχειρίδιο.\n\nΓια να ενεργοποιήσετε το ανέβασμα αρχείων, αλλάξτε την κατάσταση του υποκαταλόγου <code>images</code> που βρίσκεται κάτω από τον ριζικό κατάλογο του MediaWiki έτσι ώστε ο διακομιστής Ιστού να μπορεί να γράψει σε αυτόν.\nΣτη συνέχεια ενεργοποιήσετε αυτή την επιλογή.",
        "config-upload-deleted": "Καταλόγος για διαγραφέντα αρχεία:",
+       "config-upload-deleted-help": "Επιλέξτε έναν κατάλογο στον οποίο να αρχειοθετείτε τα διαγραμμένα αρχεία.\nΙδανικά, αυτό δεν θα πρέπει να είναι προσβάσιμο από τον Ιστό.",
        "config-logo": "Διεύθυνση URL λογότυπου:",
+       "config-logo-help": "Το προεπιλεγμένο θέμα εμφάνισης του MediaWiki περιλαμβάνει χώρο για λογότυπο 135x160 εικονοστοιχείων πάνω από το μενού της πλαϊνής μπάρας. Ανεβάστε μια εικόνα με το κατάλληλο μέγεθος και εισαγάγετε τη διεύθυνση URL εδώ.\n\nΜπορείτε να χρησιμοποιήσετε τα <code>$wgStylePath</code> ή <code>$wgScriptPath</code> εάν το λογότυπό σας είναι σχετικό με αυτές τις διαδρομές.\n\nΕάν δεν θέλετε λογότυπο, αφήστε αυτό το πλαίσιο κενό.",
        "config-instantcommons": "Ενεργοποίηση Instant Commons",
+       "config-instantcommons-help": "Τα [https://www.mediawiki.org/wiki/InstantCommons Instant Commons] είναι ένα χαρακτηριστικό που επιτρέπει στα wiki να χρησιμοποιούν εικόνες, ήχους και άλλα μέσα που βρίσκονται στον ιστότοπο των Wikimedia Commons. Για να γίνει αυτό, το MediaWiki απαιτεί πρόσβαση στο Διαδίκτυο.\n\nΓια περισσότερες πληροφορίες σχετικά με αυτήν τη δυνατότητα, συμπεριλαμβανομένων των οδηγιών για τον τρόπο ρύθμισης της για άλλα wiki από τα Wikimedia Commons, συμβουλευτείτε [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos το εγχειρίδιο].",
        "config-cc-error": "Ο επιλογέας αδειών  Creative Commons επιλογέα δεν έδωσε κανένα αποτέλεσμα.\nΕισάγετε το όνομα της άδειας χειροκίνητα.",
        "config-cc-again": "Επιλέξτε ξανά...",
        "config-cc-not-chosen": "Επιλέξτε την  άδεια Creative Commons που θέλετε και κάντε κλικ στο κουμπί \"proceed\".",
        "config-advanced-settings": "Προηγμένες ρυθμίσεις παραμέτρων",
        "config-cache-options": "Ρυθμίσεις για την προσωρινή αποθήκευση αντικειμένου:",
+       "config-cache-help": "Η προσωρινή αποθήκευση αντικειμένων χρησιμοποιείται για τη βελτίωση της ταχύτητας του MediaWiki με προσωρινή αποθήκευση των δεδομένων που χρησιμοποιούνται συχνά.\nΜεσαίοι και μεγάλοι ιστότοποι ενθαρρύνονται ιδιαίτερα να το ενεργοποιήσουν αυτό και μικροί ιστότοποι θα δουν οφέλη επίσης.",
+       "config-cache-none": "Χωρίς προσωρινή αποθήκευση (δεν καταργείται καμία λειτουργία, αλλά η ταχύτητα μπορεί να επηρεαστεί σε μεγαλύτερους ιστότοπους wiki)",
+       "config-cache-memcached": "Χρήση Memcached (απαιτεί πρόσθετη ρύθμιση και διαμόρφωση)",
        "config-memcache-badip": "Έχετε εισάγει μια μη έγκυρη διεύθυνση IP για το Memcached: $1.",
        "config-memcache-noport": "Δεν καθορίσατε μια θύρα για να χρησιμοποιήσετε για το Memcached server: $1.\nΑν δεν ξέρετε τη θύρα, η προεπιλογή είναι 11211.",
        "config-memcache-badport": "Οι Memcached αριθμοί θύρας θα πρέπει να είναι μεταξύ $1 και $2.",
        "config-install-mainpage-exists": "Κύρια σελίδα ήδη υπάρχει, παρακάμπτεται",
        "config-install-extension-tables": "Γίνεται δημιουργία πινάκων για τις εγκατεστημένες επεκτάσεις",
        "config-install-mainpage-failed": "Δεν ήταν δυνατή η εισαγωγή της αρχικής σελίδας: $1",
-       "config-install-done": "<strong>Συγχαρητήρια!</strong>\nΈχετε εγκαταστήσει με επιτυχία το MediaWiki.\n\nΤο πρόγραμμα εγκατάστασης έχει δημιουργήσει το  αρχείο   <code>LocalSettings.php</code>.\nΠεριέχει όλες τις ρυθμίσεις παραμέτρων σας.\n\nΘα πρέπει να το κατεβάσετε και να το βάλετε στη βάση της εγκατάστασης του  wiki σας (στον ίδιο κατάλογο όπως το  index.php). Η λήψη θα αρχίσει αυτόματα.\n\nΑν η λήψη δεν προσφέφθηκε, ή αν την ακυρώσατε, μπορείτε να επανεκκινήσετε τη λήψη κάνοντας κλικ στο παρακάτω link:\n\n$3\n\n<strong>Σημείωση:</strong> Εάν δεν το κάνετε αυτό τώρα, αυτό το  αρχείο ρύθμισης παραμέτρων δεν θα είναι διαθέσιμο για σας αργότερα, αν βγείτε από την εγκατάσταση, χωρίς να το κατεβάσετε!\n\nΌταν γίνει αυτό, μπορείτε να <strong>[$2 μπείτε στο wiki σας]</strong>.",
+       "config-install-done": "<strong>Συγχαρητήρια!</strong>\nΈχετε εγκαταστήσει το MediaWiki.\n\nΤο πρόγραμμα εγκατάστασης έχει δημιουργήσει το αρχείο <code>LocalSettings.php</code>.\nΠεριέχει όλες τις ρυθμίσεις παραμέτρων σας.\n\nΘα πρέπει να το κατεβάσετε και να το βάλετε στη βάση της εγκατάστασης του wiki σας (στον ίδιο κατάλογο με το index.php). Η λήψη θα πρέπει να έχει ξεκινήσει αυτόματα.\n\nΕάν δεν σας προτάθηκε λήψη, ή αν την ακυρώσατε, μπορείτε να επανεκκινήσετε τη λήψη κάνοντας κλικ στο σύνδεσμο ακριβώς από κάτω:\n\n$3\n\n<strong>Σημείωση:</strong> Εάν δεν το κάνετε αυτό τώρα, αυτό το αρχείο ρύθμισης παραμέτρων δεν θα είναι διαθέσιμο για σας αργότερα αν βγείτε από την εγκατάσταση χωρίς να το κατεβάσετε!\n\nΌταν θα έχει γίνει αυτό, μπορείτε να <strong>[$2 μπείτε στο wiki σας]</strong>.",
        "config-install-success": " Το σύστημα της MediaWiki έχει εγκατασταθεί με επιτυχία. Μπορείτε τώρα να επισκεφθείτε το \n <$1$2> για να δείτε το wiki σας.\nΑν έχετε ερωτήσεις, ελέγξετε την λίστα με τις πιο συχνές ερωτήσεις:\n<https://www.mediawiki.org/wiki/Manual:FAQ> ή χρησιμοποιήστε ένα από τα φόρουμ υποστήριξης που είναι συνδεδεμένα σε αυτήν την σελίδα.",
        "config-download-localsettings": "Λήψη του <code>LocalSettings.php</code>",
        "config-help": "βοήθεια",
        "config-help-tooltip": "κλικ για ανάπτυξη",
        "config-nofile": "Το αρχείο «$1» δεν μπορεί να βρεθεί. Μήπως έχει διαγραφεί;",
-       "config-extension-link": "Γνωρίζατε ότι το wiki σας υποστηρίζει [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions επεκτάσεις];\n\nΜπορείτε να περιηγηθείτε [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category επεκτάσεις ανά κατηγορία] ή το [https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] για να δείτε την πλήρη λίστα των επεκτάσεων.",
+       "config-extension-link": "Γνωρίζατε ότι το wiki σας υποστηρίζει [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions επεκτάσεις];\n\nΜπορείτε να περιηγηθείτε στις [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category επεκτάσεις ανά κατηγορία] ή στον [https://www.mediawiki.org/wiki/Extension_Matrix πίνακα επεκτάσεων] για να δείτε την πλήρη λίστα των επεκτάσεων.",
        "config-skins-screenshots": "$1 (στιγμιότυπα: $2)",
        "config-screenshot": "στιγμιότυπο",
        "mainpagetext": "<strong>To MediaWiki εγκαταστάθηκε.</strong>",
index 141e904..8d6c35e 100644 (file)
        "expansion-depth-exceeded-warning": "الصفحة تجاوزت عمق التوسيع",
        "parser-unstrip-loop-warning": "حلقة معراة تم الكشف عنها",
        "unstrip-depth-warning": "تعدى حد العودية Unstrip  ($1)",
+       "unstrip-depth-category": "الصفحات التي يتم تجاوز حد عمق أونستريب فيها",
+       "unstrip-size-warning": "تم تجاوز حد الحجم Unstrip ($1)",
+       "unstrip-size-category": "الصفحات التي يتم تجاوز الحد الأقصى لحجم أونستريب فيها",
        "converter-manual-rule-error": "خطأ تم اكتشافه في قاعدة تحويل اللغة اليدوية",
        "undo-success": "يمكن استرجاع التعديل.\nتحقق من المقارنة بالأسفل للتأكد من أن هذا هو ما تريد أن تفعله، ثم احفظ التغييرات بالأسفل للانتهاء من استرجاع التعديل.",
        "undo-failure": "لم يمكن استرجاع التعديل بسبب تعديلات متعارضة تمت على الصفحة.",
        "limitreport-templateargumentsize-value": "$1/$2 {{PLURAL:$2|بايت}}",
        "limitreport-expansiondepth": "أعمق التوسيعات",
        "limitreport-expensivefunctioncount": "دوال محللة مكلفة",
+       "limitreport-unstrip-depth": "عمق الاستدعاء الذاتي لأونستريب",
+       "limitreport-unstrip-depth-value": "$1/$2",
+       "limitreport-unstrip-size": "حجم أونستريب ما بعد التوسع",
+       "limitreport-unstrip-size-value": "$1/$2 {{PLURAL:$2|بايت}}",
        "expandtemplates": "توسعة قالب",
        "expand_templates_intro": "تتعامل هذه الصفحة الخاصة مع نصوص الويكي وتقوم بفرد كل القوالب الموجودة به.\nوتقوم أيضا بفرد دوال القوالب مثل\n<code><nowiki>{{</nowiki>#language:…}}</code> and variables like <code><nowiki>{{</nowiki>CURRENTDAY}}</code>. حقيقةً، تقوم التعامل مع كل ما بين الأقواس المزدوجة.",
        "expand_templates_title": "عنوان صفحة هذا النص، لأجل معالجة {{FULLPAGENAME}} إلخ.:",
index 4120ffc..7d6c6fa 100644 (file)
        "expansion-depth-exceeded-category-desc": "Старонка перавышае максымальную глыбіню раскрыцьця.",
        "expansion-depth-exceeded-warning": "Старонка перавысіла дазволеную глыбіню разгортваньня",
        "parser-unstrip-loop-warning": "Вызначаная пятля unstrip",
-       "unstrip-depth-warning": "Перавышаны ліміт рэкурсіі unstrip ($1)",
+       "unstrip-depth-warning": "Перавышаны ліміт глыбіні функцыі unstrip ($1)",
        "converter-manual-rule-error": "Знойдзеная памылка ў ручным правіле моўнага канвэртару",
        "undo-success": "Рэдагаваньне можа быць адмененае. Калі ласка, параўнайце адрозьненьні паміж вэрсіямі, каб упэўніцца, што гэта адпаведныя зьмены, а потым запішыце зьмены для сканчэньня рэдагаваньня.",
        "undo-failure": "Рэдагаваньне ня можа быць скасаванае праз канфлікт паміж папярэднімі рэдагаваньнямі.",
        "limitreport-templateargumentsize-value": "$1/$2 {{PLURAL:$2|байт}}",
        "limitreport-expansiondepth": "Найбольшая глыбіня разгортваньня",
        "limitreport-expensivefunctioncount": "Колькасьць дарагіх функцыяў парсэра",
+       "limitreport-unstrip-depth-value": "$1/$2",
        "expandtemplates": "Разгортваньне шаблёнаў",
        "expand_templates_intro": "Гэтая спэцыяльная старонка бярэ вікітэкст і разгортвае ўсе шаблёны рэкурсіўна.\nАдначасова разгортваюцца функцыі парсэру накшталт\n<code><nowiki>{{</nowiki>#language:…}}</code>, і зьменныя накшталт\n<code><nowiki>{{</nowiki>CURRENTDAY}}</code>\nФактычна, гэтая старонка разгортвае амаль усё ўнутры падвойных фігурных дужак.",
        "expand_templates_title": "Загаловак старонкі, для {{FULLPAGENAME}} і г.д.:",
index bcceb8f..45df08b 100644 (file)
        "limitreport-templateargumentsize-value": "$1/$2 {{PLURAL:$2|বাইট}}",
        "limitreport-expansiondepth": "সর্বোচ্চ গভীরতা বিস্তার",
        "limitreport-expensivefunctioncount": "ব্যয়বহুল পার্সার ফাংশন গণনা",
+       "limitreport-unstrip-size-value": "$1/$2 {{PLURAL:$2|বাইট}}",
        "expandtemplates": "টেমপ্লেট সম্প্রসারণ",
        "expand_templates_intro": "এই বিশেষ পাতাটি কিছু উইকিটেক্সট গ্রহণ করে এবং এর ভেতরের সব টেমপ্লেট বারংবার সম্প্রসারিত করে।\nএছাড়াও এটি\n<code><nowiki>{{</nowiki>#language:...}}</code>-এর মত পার্সার ফাংশন,\n<code><nowiki>{{</nowiki>CURRENTDAY}}</code>-এর মত ভ্যারিয়েবল\nমোটকথা দ্বিতীয় বন্ধনীর মধ্যে অবস্থিত সবকিছুকেই সম্প্রসারিত করতে পারে।",
        "expand_templates_title": "প্রাতিবেশিক শিরোনাম, {{FULLPAGENAME}}, ইত্যাদির জন্য:",
index f92c660..68769ef 100644 (file)
        "botpasswords-label-delete": "Slet",
        "botpasswords-label-resetpassword": "Nulstil adgangskode",
        "botpasswords-label-grants": "Tilgængelige bevillinger:",
+       "botpasswords-help-grants": "Tildelinger giver tilgang til rettighederne som allerede indehaves af din brugerkonto. Aktivering af en rettighed her giver ikke adgang til alle rettigheder din brugerkonto ikke ellers ville have. Se [[Special:ListGrants|tildelingstabellen]] for yderligere information.",
        "botpasswords-label-grants-column": "Tildelt",
        "botpasswords-bad-appid": "Robotnavnet »$1« er ikke gyldigt.",
        "botpasswords-insert-failed": "Kunne ikke tilføje robotnavnet »$1«. Var det allerede tilføjet?",
        "botpasswords-update-failed": "Kunne ikke tilføje robotnavnet »$1«. Er det slettet?",
        "botpasswords-created-title": "Botkodeord oprettet",
-       "botpasswords-created-body": "Robottens adgangskode for robotnavn »$1« for bruger »$2« blev oprettet.",
+       "botpasswords-created-body": "Robottens adgangskode for robotnavn »$1« for {{GENDER:$2|brugeren}} »$2« blev oprettet.",
        "botpasswords-updated-title": "Bot kodeord opdateret",
-       "botpasswords-updated-body": "Robottens adgangskode for robotnavn »$1« for brugeren »$2« blev opdateret.",
+       "botpasswords-updated-body": "Robottens adgangskode for robotnavn »$1« for {{GENDER:$2|brugeren}} »$2« blev opdateret.",
        "botpasswords-deleted-title": "Bot kodeord slettet",
-       "botpasswords-deleted-body": "Robottens adgangskode for robotnavn »$1« for brugeren »$2« blev slettet.",
+       "botpasswords-deleted-body": "Robottens adgangskode for robotnavn »$1« for {{GENDER:$2|brugeren}} »$2« blev slettet.",
        "botpasswords-newpassword": "Den nye adgangskode at logge ind med for <strong>$1</strong> er <strong>$2</strong>. <em>Gem denne oplysning for fremtidig reference.</em> <br> (For gamle robotter som kræver at logindnavnet er det samme som det eventuelle brugernavn, så kan du også bruge <strong>$3</strong> som brugernavn og <strong>$4</strong> som adgangskode).",
        "botpasswords-no-provider": "BotPasswordsSessionProvider er ikke tilgængelig.",
        "botpasswords-restriction-failed": "Begrænsninger for robotadgangskode forhindrer dette logind.",
index 9a92ef2..b78710a 100644 (file)
        "parser-unstrip-loop-warning": "Zirkelbezug festgestellt",
        "unstrip-depth-warning": "Rekursionsgrenze beim Auflösen überschritten ($1)",
        "unstrip-depth-category": "Seiten, auf denen die Unstrip-Tiefengrenze überschritten ist.",
+       "unstrip-size-warning": "Unstrip-Größengrenze überschritten ($1)",
+       "unstrip-size-category": "Seiten, auf denen die Unstrip-Größengrenze überschritten ist",
        "converter-manual-rule-error": "Bei der manuellen Sprachkonvertierungsregel wurde ein Fehler entdeckt.",
        "undo-success": "Die Bearbeitung kann rückgängig gemacht werden.\nBitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und speichere dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.",
        "undo-failure": "Die Änderung konnte nicht rückgängig gemacht werden, da der betroffene Abschnitt zwischenzeitlich verändert wurde.",
        "limitreport-expansiondepth": "Höchste Expansionstiefe",
        "limitreport-expansiondepth-value": "$1/$2",
        "limitreport-expensivefunctioncount": "Anzahl aufwändiger Parserfunktionen",
+       "limitreport-unstrip-depth": "Unstrip-Rekursionstiefe",
+       "limitreport-unstrip-depth-value": "$1 von $2",
+       "limitreport-unstrip-size": "Unstrip-Größe nach dem Expandieren",
+       "limitreport-unstrip-size-value": "$1 von $2 {{PLURAL:$2|Byte|Bytes}}",
        "expandtemplates": "Vorlagen expandieren",
        "expand_templates_intro": "Auf dieser Spezialseite kann Wikitext eingegeben werden. Alle enthaltenen Vorlagen werden dabei rekursiv expandiert.\nAuch Parserfunktionen wie\n<code><nowiki>{{</nowiki>#language:…}}</code> und Variablen wie\n<code><nowiki>{{</nowiki>CURRENTDAY}}</code> werden ausgewertet –\nfaktisch alles, was in doppelten geschweiften Klammern enthalten ist.",
        "expand_templates_title": "Kontexttitel für beispielsweise {{FULLPAGENAME}}:",
index f9ac094..0f58aaf 100644 (file)
        "node-count-exceeded-warning": "Pela amora gozgıra ravêr da",
        "expansion-depth-exceeded-category": "Perrê ke xoriyiya herabiyayışi tede ravêrdeya.",
        "expansion-depth-exceeded-warning": "Ravêriya pela xori herayêna",
-       "parser-unstrip-loop-warning": "Unstrip lete vineya",
-       "unstrip-depth-warning": "Sinorê limit dê qayış dê ($1) ravêrya",
+       "parser-unstrip-loop-warning": "Çerxê newekerdışi vêniya",
+       "unstrip-depth-warning": "Sinorê newekerdışi ($1) viyarna ra",
        "converter-manual-rule-error": "Rehberê zıwan açarnayışi dı xırabin tesbit biya",
        "undo-success": "No vurnayiş tepeye geryeno. pêverronayişêyê cêrıni kontrol bıkeri.",
        "undo-failure": "Poxta pëverameyişa vurnayişan ra  peyd grotışë kari në bı",
index daa5066..d9f1efd 100644 (file)
        "version-poweredby-others": "άλλοι",
        "version-poweredby-translators": "translatewiki.net μεταφραστές",
        "version-credits-summary": "Θα θέλαμε να αναγνωρίσουμε τη συμβολή των παρακάτω προσώπων στο [[Special:Version|MediaWiki]].",
-       "version-license-info": "Το MediaWiki ÎµÎ¯Î½Î±Î¹ ÎµÎ»ÎµÏ\8dθεÏ\81ο Î»Î¿Î³Î¹Ï\83μικÏ\8c. Î\9cÏ\80οÏ\81είÏ\84ε Î½Î± Ï\84ο Î±Î½Î±Î´Î¹Î±Î½ÎµÎ¯Î¼ÎµÏ\84ε Î®/και Î½Î± Ï\84ο Ï\84Ï\81οÏ\80οÏ\80οιήÏ\83εÏ\84ε Ï\85Ï\80Ï\8c Ï\84οÏ\85Ï\82 Ï\8cÏ\81οÏ\85Ï\82 Ï\84ηÏ\82 Î¬Î´ÎµÎ¹Î±Ï\82 GNU General Public License Ï\8cÏ\80Ï\89Ï\82 Î±Ï\85Ï\84ή ÎµÎºÎ´Ï\8cθηκε Î±Ï\80Ï\8c Ï\84ο Free Software Foundation· ÎµÎ¯Ï\84ε Ï\84ηÏ\82 Î´ÎµÏ\8dÏ\84εÏ\81ηÏ\82 Î­ÎºÎ´Î¿Ï\83ηÏ\82 Ï\84ηÏ\82 Î¬Î´ÎµÎ¹Î±Ï\82, ÎµÎ¯Ï\84ε (καÏ\84' ÎµÏ\80ιλογή Ï\83αÏ\82) Î¿Ï\80οιαÏ\83δήÏ\80οÏ\84ε ÎµÏ\80Ï\8cμενηÏ\82 Î­ÎºÎ´Î¿Ï\83ηÏ\82.\n\nΤο MediaWiki Î´Î¹Î±Î½Î­Î¼ÎµÏ\84αι Î¼Îµ Ï\84ην ÎµÎ»Ï\80ίδα Ï\8cÏ\84ι Î¸Î± ÎµÎ¯Î½Î±Î¹ Ï\87Ï\81ήÏ\83ιμο, Î±Î»Î»Î¬ <em>ΧΩΡÎ\99Σ Î\9aÎ\91Î\9cÎ\99Î\91 Î\95Î\93Î\93Î¥Î\97ΣÎ\97</em>· Î¿Ï\8dÏ\84ε ÎºÎ±Î½ Ï\84ην Ï\83ιÏ\89Ï\80ηÏ\81ή ÎµÎ³Î³Ï\8dηÏ\83η <strong>Î\95Î\9cΠÎ\9fΡÎ\95ΥΣÎ\99Î\9cÎ\9fΤÎ\97ΤÎ\91Σ</strong> Î® <strong>Î\9aÎ\91ΤÎ\91Î\9bÎ\9bÎ\97Î\9bÎ\9fΤÎ\97ΤÎ\91Σ Î\93Î\99Î\91 Î\95Î\9dÎ\91 Î£Î¥Î\93Î\9aÎ\95Î\9aΡÎ\99Î\9cÎ\95Î\9dÎ\9f Î£Î\9aÎ\9fΠÎ\9f</strong>. Î\94είÏ\84ε Ï\84ην GNU General Public License Î³Î¹Î± Ï\80εÏ\81ιÏ\83Ï\83Ï\8cÏ\84εÏ\81εÏ\82 Î»ÎµÏ\80Ï\84ομέÏ\81ειεÏ\82.\n\nÎ\98α Ï\80Ï\81έÏ\80ει Î½Î± Î­Ï\87εÏ\84ε Î»Î¬Î²ÎµÎ¹ [{{SERVER}}{{SCRIPTPATH}}/COPYING Î­Î½Î± Î±Î½Ï\84ίγÏ\81αÏ\86ο Ï\84ηÏ\82 GNU General Public License] μαζί με αυτό το πρόγραμμα· αν όχι, στείλτε ένα γράμμα στο Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ή [//www.gnu.org/licenses/old-licenses/gpl-2.0.html διαβάστε το διαδικτυακά].",
+       "version-license-info": "Το MediaWiki ÎµÎ¯Î½Î±Î¹ ÎµÎ»ÎµÏ\8dθεÏ\81ο Î»Î¿Î³Î¹Ï\83μικÏ\8c. Î\9cÏ\80οÏ\81είÏ\84ε Î½Î± Ï\84ο Î±Î½Î±Î´Î¹Î±Î½ÎµÎ¯Î¼ÎµÏ\84ε Î®/και Î½Î± Ï\84ο Ï\84Ï\81οÏ\80οÏ\80οιήÏ\83εÏ\84ε Ï\85Ï\80Ï\8c Ï\84οÏ\85Ï\82 Ï\8cÏ\81οÏ\85Ï\82 Ï\84ηÏ\82 Î\93ενικήÏ\82 Î\86δειαÏ\82 Î\94ημÏ\8cÏ\83ιαÏ\82 Î§Ï\81ήÏ\83ηÏ\82 GNU Ï\8cÏ\80Ï\89Ï\82 Î±Ï\85Ï\84ή Î´Î·Î¼Î¿Ï\83ιεÏ\8dεÏ\84αι Î±Ï\80Ï\8c Ï\84ο Î\8aδÏ\81Ï\85μα Î\95λεÏ\8dθεÏ\81οÏ\85 Î\9bογιÏ\83μικοÏ\8d· ÎµÎ¯Ï\84ε Ï\84ηÏ\82 Î­ÎºÎ´Î¿Ï\83ηÏ\82 2 Ï\84ηÏ\82 Î\86δειαÏ\82, ÎµÎ¯Ï\84ε (καÏ\84' ÎµÏ\80ιλογήν Ï\83αÏ\82) Î¿Ï\80οιαÏ\83δήÏ\80οÏ\84ε Î¼ÎµÏ\84αγενέÏ\83Ï\84εÏ\81ηÏ\82 Î­ÎºÎ´Î¿Ï\83ηÏ\82.\n\nΤο MediaWiki Î´Î¹Î±Î½Î­Î¼ÎµÏ\84αι Î¼Îµ Ï\84ην ÎµÎ»Ï\80ίδα Ï\8cÏ\84ι Î¸Î± ÎµÎ¯Î½Î±Î¹ Ï\87Ï\81ήÏ\83ιμο, Î±Î»Î»Î¬ <em>ΧΩΡÎ\99Σ Î\9aÎ\91Î\9cÎ\99Î\91 Î\95Î\93Î\93Î¥Î\97ΣÎ\97</em>· Ï\87Ï\89Ï\81ίÏ\82 ÎºÎ±Î½ Ï\84η Ï\83ιÏ\89Ï\80ηÏ\81ή ÎµÎ³Î³Ï\8dηÏ\83η <strong>Î\95Î\9cΠÎ\9fΡÎ\95ΥΣÎ\99Î\9cÎ\9fΤÎ\97ΤÎ\91Σ</strong> Î® <strong>Î\9aÎ\91ΤÎ\91Î\9bÎ\9bÎ\97Î\9bÎ\9fΤÎ\97ΤÎ\91Σ Î\93Î\99Î\91 Î£Î¥Î\93Î\9aÎ\95Î\9aΡÎ\99Î\9cÎ\95Î\9dÎ\9f Î£Î\9aÎ\9fΠÎ\9f</strong>. Î\94είÏ\84ε Ï\84η Î\93ενική Î\86δεια Î\94ημÏ\8cÏ\83ιαÏ\82 Î§Ï\81ήÏ\83ηÏ\82 GNU Î³Î¹Î± Ï\80εÏ\81ιÏ\83Ï\83Ï\8cÏ\84εÏ\81εÏ\82 Î»ÎµÏ\80Ï\84ομέÏ\81ειεÏ\82.\n\nÎ\98α Ï\80Ï\81έÏ\80ει Î½Î± Î­Ï\87εÏ\84ε Ï\80αÏ\81αλάβει [{{SERVER}}{{SCRIPTPATH}}/COPYING Î­Î½Î± Î±Î½Ï\84ίγÏ\81αÏ\86ο Ï\84ηÏ\82 Î\93ενικήÏ\82 Î\86δειαÏ\82 Î\94ημÏ\8cÏ\83ιαÏ\82 Î§Ï\81ήÏ\83ηÏ\82 GNU] μαζί με αυτό το πρόγραμμα· αν όχι, στείλτε ένα γράμμα στο Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ή [//www.gnu.org/licenses/old-licenses/gpl-2.0.html διαβάστε το διαδικτυακά].",
        "version-software": "Εγκατεστημένο λογισμικό",
        "version-software-product": "Προϊόν",
        "version-software-version": "Έκδοση",
        "limitreport-templateargumentsize-value": "$1 από $2 {{PLURAL:$2|byte|bytes}}",
        "limitreport-expansiondepth": "Μεγαλύτερο βάθος ανάπτυξης",
        "limitreport-expensivefunctioncount": "Πλήθος ακριβών συναρτήσεων συντακτικού αναλυτή",
+       "limitreport-unstrip-depth-value": "$1/$2",
+       "limitreport-unstrip-size-value": "$1/$2 {{PLURAL:$2|byte|bytes}}",
        "expandtemplates": "Επέκταση προτύπων",
        "expand_templates_intro": "Αυτή η ειδική σελίδα παίρνει κώδικα wiki και αναπτύσσει όλα τα πρότυπα σε αυτό αναδρομικά. \nΕπίσης αναπτύσσει συναρτήσεις συντακτικού αναλυτή όπως η\n<nowiki>{{</nowiki>#language:…}}, και μεταβλητές όπως η\n<nowiki>{{</nowiki>CURRENTDAY}}.\nΟυσιαστικά επεκτείνει οτιδήποτε βρίσκεται σε διπλές αγκύλες.",
        "expand_templates_title": "Τίτλων συμφραζόμενων, για την {{FULLPAGENAME}} κ.τ.λ.:",
        "authpage-cannot-create": "Αποτυχία στην αρχή δημιουργίας λογαριασμού.",
        "cannotauth-not-allowed-title": "Δεν έχετε δικαίωμα πρόσβασης.",
        "cannotauth-not-allowed": "Δεν επιτρέπεται να χρησιμοποιήσετε αυτή τη σελίδα",
+       "changecredentials": "Αλλαγή πιστοποιητικών",
+       "changecredentials-submit": "Αλλαγή πιστοποιητικών",
+       "removecredentials": "Αφαίρεση πιστοποιητικών",
+       "removecredentials-submit": "Αφαίρεση πιστοποιητικών",
        "credentialsform-account": "Όνομα λογαριασμού:",
+       "cannotlink-no-provider-title": "Δεν υπάρχουν συνδέσιμοι λογαριασμοί",
+       "cannotlink-no-provider": "Δεν υπάρχουν συνδέσιμοι λογαριασμοί.",
        "linkaccounts": "Σύνδεση λογαριασμών",
        "linkaccounts-success-text": "Ο λογαριασμός συνδέθηκε",
        "linkaccounts-submit": "Σύνδεση λογαριασμών",
+       "unlinkaccounts": "Ξεσύνδεση λογαριασμών",
+       "unlinkaccounts-success": "Ο λογαριασμός ξεσυνδέθηκε.",
        "userjsispublic": "Σημείωση: Οι υποσελίδες JavaScript δεν πρέπει να περιέχουν εμπιστευτικά δεδομένα καθώς είναι ορατά από άλλους χρήστες.",
        "usercssispublic": "Σημείωση: Οι υποσελίδες CSS δεν πρέπει να περιέχουν εμπιστευτικά δεδομένα καθώς είναι ορατά από άλλους χρήστες.",
+       "edit-error-short": "Σφάλμα: $1",
+       "edit-error-long": "Σφάλματα: \n\n$1",
        "revid": "αναθεώρηση $1",
+       "pagedata-title": "Δεδομένα σελίδας",
        "pagedata-bad-title": "Μη έγκυρος τίτλος: $1."
 }
index 6ff4237..aaaf785 100644 (file)
        "stub-threshold-disabled": "Disabled",
        "recentchangesdays": "Days to show in recent changes:",
        "recentchangesdays-max": "Maximum $1 {{PLURAL:$1|day|days}}",
-       "recentchangescount": "Number of edits to show by default:",
-       "prefs-help-recentchangescount": "This includes recent changes, page histories, and logs.",
+       "recentchangescount": "Number of edits to show in recent changes, page histories, and in logs, by default:",
+       "prefs-help-recentchangescount": "Maximum number: 1000",
        "prefs-help-watchlist-token2": "This is the secret key to the web feed of your watchlist.\nAnyone who knows it will be able to read your watchlist, so do not share it.\nIf you need to, [[Special:ResetTokens|you can reset it]].",
        "savedprefs": "Your preferences have been saved.",
        "savedrights": "The user groups of {{GENDER:$1|$1}} have been saved.",
index a7645e4..47208a7 100644 (file)
        "rcfilters-filter-bots-description": "Automaattisilla työkaluilla tehdyt muokkaukset.",
        "rcfilters-filter-humans-label": "Ihminen (ei botti)",
        "rcfilters-filter-humans-description": "Ihmisten tekemät muokkaukset.",
-       "rcfilters-filtergroup-reviewstatus": "Tarkistuksen tila",
-       "rcfilters-filter-patrolled-label": "Tarkastetut",
-       "rcfilters-filter-patrolled-description": "Tarkastetut muokkaukset",
-       "rcfilters-filter-unpatrolled-label": "Ei tarkastetut",
-       "rcfilters-filter-unpatrolled-description": "Muutokset, joita ei ole tarkastettu",
+       "rcfilters-filtergroup-reviewstatus": "Sivun partioinnin status",
+       "rcfilters-filter-patrolled-label": "Partioidut",
+       "rcfilters-filter-patrolled-description": "Muokkaukset, jotka on merkitty partioiduiksi.",
+       "rcfilters-filter-unpatrolled-label": "Ei ole partioitu",
+       "rcfilters-filter-unpatrolled-description": "Muutokset, joita ei ole merkitty partioiduiksi.",
        "rcfilters-filtergroup-significance": "Merkitys",
        "rcfilters-filter-minor-label": "Pienet muutokset",
        "rcfilters-filter-minor-description": "Muokkaukset, jotka on merkitty pieniksi.",
        "rcfilters-typeofchange-conflicts-hideminor": "\"Muutoksen tyyppi\" on ristiriidassa \"Pienet muutokset\" -suodattimen kanssa. Joitain muutostyyppejä ei voida merkitä \"pieniksi\".",
        "rcfilters-filtergroup-lastRevision": "Viimeisimmät versiot",
        "rcfilters-filter-lastrevision-label": "Viimeisin versio",
-       "rcfilters-filter-lastrevision-description": "Vain viimeisin muutos sivulle.",
+       "rcfilters-filter-lastrevision-description": "Vain viimeisin muutos sivuun.",
        "rcfilters-filter-previousrevision-label": "Ei viimeisin muutos",
        "rcfilters-filter-previousrevision-description": "Kaikki muutokset, jotka eivät ole viimeisin versio.",
        "rcfilters-filter-excluded": "Poissuljettu",
index 012ba17..f72ffcc 100644 (file)
        "expansion-depth-exceeded-warning": "Page dépassant la profondeur d’expansion maximale",
        "parser-unstrip-loop-warning": "Boucle non dépilable détectée",
        "unstrip-depth-warning": "Limite de récursion non dépilable dépassée ($1)",
+       "unstrip-depth-category": "Pages où la limite de profondeur de développement est dépassée",
+       "unstrip-size-warning": "Limite de taille de développement dépassée ($1)",
+       "unstrip-size-category": "Pages où la limite de taille de développement est dépassée",
        "converter-manual-rule-error": "Erreur détectée dans la règle manuelle de conversion de langue",
        "undo-success": "Cette modification va être annulée.\nVeuillez vérifier les différences ci-dessous, puis publier l’annulation si c’est bien ce que vous voulez faire.",
        "undo-failure": "Cette modification ne peut pas être défaite : cela entrerait en conflit avec les modifications intermédiaires.",
        "limitreport-templateargumentsize-value": "$1/$2 {{PLURAL:$2|octet|octets}}",
        "limitreport-expansiondepth": "Profondeur d’expansion maximale",
        "limitreport-expensivefunctioncount": "Nombre de fonctions d’analyse coûteuses",
+       "limitreport-unstrip-depth": "Profondeur de récursion de développement",
+       "limitreport-unstrip-depth-value": "$1/$2",
+       "limitreport-unstrip-size": "Taille de développement après expansion",
+       "limitreport-unstrip-size-value": "$1/$2 {{PLURAL:$2|octet|octets}}",
        "expandtemplates": "Expansion des modèles",
        "expand_templates_intro": "Cette page spéciale accepte un texte wiki et réalise récursivement l’expansion de tous les modèles qu’il contient.\nElle réalise aussi l’expansion des fonctions d’analyse prises en charge telles que\n<code><nowiki>{{</nowiki>#language:...}}</code> et des variables telles que\n<code><nowiki>{{</nowiki>CURRENTDAY}}</code>.\nEn fait, elle réalise l’expansion de pratiquement tout ce qui est encadré par des doubles accolades.",
        "expand_templates_title": "Titre de la page, si le code utilise {{FULLPAGENAME}}, etc. :",
index c0a9312..559960d 100644 (file)
@@ -32,7 +32,7 @@ class TidySupport {
         * @param bool $useConfiguration
         */
        public function __construct( $useConfiguration = false ) {
-               global $IP, $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig,
+               global $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig,
                        $wgTidyConf, $wgTidyOpts;
 
                $this->enabled = true;
@@ -55,26 +55,7 @@ class TidySupport {
                                $this->enabled = false;
                        }
                } else {
-                       $this->config = [
-                               'tidyConfigFile' => "$IP/includes/tidy/tidy.conf",
-                               'tidyCommandLine' => '',
-                       ];
-                       if ( extension_loaded( 'tidy' ) && ( wfIsHHVM() || class_exists( 'tidy' ) ) ) {
-                               $this->config['driver'] = wfIsHHVM() ? 'RaggettInternalHHVM' : 'RaggettInternalPHP';
-                       } else {
-                               if ( is_executable( $wgTidyBin ) ) {
-                                       $this->config['driver'] = 'RaggettExternal';
-                                       $this->config['tidyBin'] = $wgTidyBin;
-                               } else {
-                                       $path = ExecutableFinder::findInDefaultPaths( $wgTidyBin );
-                                       if ( $path !== false ) {
-                                               $this->config['driver'] = 'RaggettExternal';
-                                               $this->config['tidyBin'] = $wgTidyBin;
-                                       } else {
-                                               $this->enabled = false;
-                                       }
-                               }
-                       }
+                       $this->config = [ 'driver' => 'RemexHtml' ];
                }
                if ( !$this->enabled ) {
                        $this->config = [ 'driver' => 'disabled' ];
index 4d6efff..6da23e1 100644 (file)
@@ -279,12 +279,6 @@ Template:EmptyTRWithHTMLAttrTest
 </table>
 !!endarticle
 
-!! article
-Template:CircularRef
-!! text
-<ref>{{CircularRef}}</ref>
-!! endarticle
-
 !! article
 Template:With: Colon
 !! text
@@ -294,22 +288,13 @@ Template with colon
 ###
 ### Basic tests
 ###
+
 !! test
 Blank input
 !! wikitext
 !! html
 !! end
 
-!! test
-CircularRef
-!! wikitext
-{{CircularRef}}
-<references />
-!! html/parsoid
-<p><span about="#mwt1" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"CircularRef","href":"./Template:CircularRef"},"params":{},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
-<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
-!! end
-
 !! test
 Simple paragraph
 !! wikitext
@@ -572,13 +557,6 @@ http://fr.wikipedia.org/wiki/🍺
 </p>
 !! end
 
-# Note that the html+tidy output removes the spaces after the <li>,
-# which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
-# This is an issue for all tests with lists.  We intentionally do
-# *not* add html+tidy clauses for these, as we don't want to
-# document/test the broken behavior.  (Parsoid matches the non-tidy
-# output in these cases.)
-
 !! test
 Simple list
 !! wikitext
@@ -1149,8 +1127,7 @@ The ''[[Main Page]]'''s talk page.
 !! end
 
 !! test
-Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
-(Requires tidy for PHP parser output to be fixed up)
+Quote balancing context should be restricted to td/th cells on the same wikitext line
 !! options
 parsoid=wt2html,wt2wt
 !! wikitext
@@ -1158,20 +1135,15 @@ parsoid=wt2html,wt2wt
 !''a!!''b
 |''a||''b
 |}
-!! html/php+tidy
+!! html+tidy
 <table>
-<tr>
+<tbody><tr>
 <th><i>a</i></th>
-<th><i>b</i></th>
+<th><i>b</i>
+</th>
 <td><i>a</i></td>
-<td><i>b</i></td>
-</tr>
-</table>
-!! html/parsoid
-<table>
-<tbody><tr><th><i>a</i></th><th><i>b</i></th>
-<td><i>a</i></td><td><i>b</i></td></tr>
-</tbody></table>
+<td><i>b</i>
+</td></tr></tbody></table>
 !! end
 
 ###
@@ -1334,11 +1306,8 @@ Non-word characters don't terminate tag names (T19663, T42670, T54022)
 </p>
 !! end
 
-# There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
-# If the non-word-character tag made it through the sanitizer, tidy
-# would munge it up.
 !! test
-Non-word characters don't terminate tag names + tidy
+Non-word characters don't terminate tag names
 !! wikitext
 <blockquote|>a</blockquote>
 
@@ -1352,12 +1321,13 @@ Non-word characters don't terminate tag names + tidy
 
 <sub-ID#1>
 !! html+tidy
-<p>&lt;blockquote|&gt;a</p>
-<p>&lt;b→&gt; doesn't terminate &lt;/b→&gt;</p>
-<p>&lt;bä&gt; doesn't terminate &lt;/bä&gt;</p>
-<p>&lt;boo&gt; doesn't terminate &lt;/boo&gt;</p>
-<p>&lt;s.foo&gt; doesn't terminate &lt;/s.foo&gt;</p>
-<p>&lt;sub-ID#1&gt;</p>
+<p>&lt;blockquote|&gt;a
+</p><p>&lt;b→&gt; doesn't terminate &lt;/b→&gt;
+</p><p>&lt;bä&gt; doesn't terminate &lt;/bä&gt;
+</p><p>&lt;boo&gt; doesn't terminate &lt;/boo&gt;
+</p><p>&lt;s.foo&gt; doesn't terminate &lt;/s.foo&gt;
+</p><p>&lt;sub-ID#1&gt;
+</p>
 !! end
 
 ###
@@ -1390,7 +1360,9 @@ parsoid=wt2html
 
 <s.foo>s</s>
 !! html/php+tidy
-<p>&lt;s.foo&gt;s</p>
+<p class="mw-empty-elt">
+</p><p>&lt;s.foo&gt;s
+</p>
 !! html/parsoid
 <p>&lt;s.foo&gt;s</p>
 !! end
@@ -1518,7 +1490,8 @@ Entities inside template parameters
 !! wikitext
 {{echo|&ndash;}}
 !! html/php+tidy
-<p>–</p>
+<p>&#8211;
+</p>
 !! html/parsoid
 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&amp;ndash;"}},"i":0}}]}'>&ndash;</span></p>
 !! end
@@ -1888,6 +1861,7 @@ IE conditional comments
 ###
 ### paragraph wrapping tests
 ###
+
 !! test
 No block tags
 !! wikitext
@@ -1911,21 +1885,23 @@ a <div>foo</div>
 <p>b
 </p>
 !! html+tidy
-<p>a</p>
-<div>foo</div>
-<p>b</p>
+<p>a </p><div>foo</div>
+<p>b
+</p>
 !! end
 
+# Remex wraps empty tag runs with p-tags.
+# Parsoid strips them out during p-wrapping.
 !! test
 No p-wrappable content
 !! wikitext
 <span><div>x</div></span>
 <span><s><div>x</div></s></span>
 <small><em></em></small><span><s><div>x</div></s></span>
-!! html+tidy
-<div><span>x</span></div>
-<div><span><s>x</s></span></div>
-<div><span><s>x</s></span></div>
+!! html/php+tidy
+<span><div>x</div></span>
+<span><s><div>x</div></s></span>
+<p><small><em></em></small></p><span><s><div>x</div></s></span>
 !! html/parsoid
 <span><div>x</div></span>
 <span><s><div>x</div></s></span>
@@ -1954,11 +1930,9 @@ a <blockquote>foo</blockquote>
 <p>b
 </p>
 !! html+tidy
-<p>a</p>
-<blockquote>
-<p>foo</p>
-</blockquote>
-<p>b</p>
+<p>a </p><blockquote><p>foo</p></blockquote>
+<p>b
+</p>
 !! end
 
 !! test
@@ -1972,10 +1946,8 @@ a <div>foo</div>
 b <div>foo</div>
 
 !! html+tidy
-<p>a</p>
-<div>foo</div>
-<p>b</p>
-<div>foo</div>
+<p>a </p><div>foo</div><p>
+b </p><div>foo</div>
 !! end
 
 !! test
@@ -1989,14 +1961,8 @@ a <blockquote>foo</blockquote>
 b <blockquote>foo</blockquote>
 
 !! html+tidy
-<p>a</p>
-<blockquote>
-<p>foo</p>
-</blockquote>
-<p>b</p>
-<blockquote>
-<p>foo</p>
-</blockquote>
+<p>a </p><blockquote><p>foo</p></blockquote><p>
+b </p><blockquote><p>foo</p></blockquote>
 !! end
 
 !! test
@@ -2016,19 +1982,21 @@ d e
 x <div>foo</div> z
 
 !! html+tidy
-<div>foo</div>
-<p>a</p>
-<p>b c d e</p>
-<p>x</p>
-<div>foo</div>
-<p>z</p>
+<div>foo</div><p> a
+</p><p>b
+c
+d e
+</p><p>
+x </p><div>foo</div><p> z
+</p>
 !! end
 
-# Tidy strips out the empty <div> tags. Parsoid doesn't.
-# So, we have a separate section for Parsoid. We don't want
-# to mimic this stripping behavior in Parsoid. It affects
-# editing experience and also requires us to maintain additional
-# info for RT-ing.
+# The difference between Parsoid & Remex here
+# is because of Parsoid's Tidy-emulation code
+# for p-wrapping. We'll start work to remove this
+# emulation code in Parsoid sooner than later.
+# Remex wraps empty tag runs with p-tags.
+# Parsoid strips them out in a separate pass.
 !! test
 Empty lines between lines with block tags
 !! wikitext
 <div>e</div>
 
 !! html+tidy
-<p><br /></p>
-<p>a</p>
-<p>b</p>
-<div>a</div>
-<p>b</p>
-<div>b</div>
-<p>d</p>
-<p><br /></p>
+<div></div>
+<p><br />
+</p>
+<div></div><p>a
+</p><p>b
+</p>
+<div>a</div><p>b
+</p><div>b</div><p>d
+</p><p><br />
+</p>
 <div>e</div>
 !! html/parsoid
 <div data-parsoid='{"stx":"html"}'></div>
@@ -2082,7 +2052,6 @@ b
 <div data-parsoid='{"stx":"html"}'>e</div>
 !! end
 
-## PHP parser emits output which is broken
 !! test
 Unclosed HTML p-tags should be handled properly
 !! wikitext
 
 b
 !! html/php+tidy
-<div>
-<p>foo</p>
-</div>
-<p>a</p>
-<p>b</p>
+<div><p>foo</p></div>
+<p>a
+</p><p>b
+</p>
 !! html/parsoid
 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
 <p>a</p>
@@ -2128,9 +2096,55 @@ parsoid=wt2html
 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
 !! end
 
+!! test
+No paragraph necessary for SOL transparent template
+!! wikitext
+<span><div>foo</div></span>
+[[Category:Foo]]
+
+<span><div>foo</div></span>
+{{echo|[[Category:Foo]]}}
+!! html/php
+<span><div>foo</div></span>
+<span><div>foo</div></span>
+
+!! html/parsoid
+<span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
+<link rel="mw:PageProp/Category" href="./Category:Foo"/>
+
+<span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
+<link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
+!! end
+
+!! test
+Avoid expanding multiline sol transparent template ranges unnecessarily
+!! wikitext
+hi
+
+
+{{echo|<br/>
+}}
+
+[[Category:Ho]]
+!! html/php
+<p>hi
+</p><p><br />
+<br />
+</p>
+!! html/parsoid
+<p>hi</p>
+
+<p><br />
+<br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;br/>\n"}},"i":0}}]}'/><span about="#mwt1">
+</span></p>
+
+<link rel="mw:PageProp/Category" href="./Category:Ho" />
+!! end
+
 ###
 ### Preformatted text
 ###
+
 !! test
 Preformatted text
 !! wikitext
@@ -2276,9 +2290,6 @@ Foo <del>bar</del> <ins>baz</ins> quux
 
 !! end
 
-# Note that the p-wrapping is newline sensitive, which could be
-# considered a bug: tidy will wrap only the 'Foo' in the example
-# below in a <p> tag. (see comment 23-25 of T8200)
 !! test
 T17491: <ins>/<del> in blockquote (2)
 !! wikitext
@@ -2289,9 +2300,8 @@ T17491: <ins>/<del> in blockquote (2)
 </blockquote>
 
 !! html+tidy
-<blockquote>
-<p>Foo</p>
-<del>bar</del> <ins>baz</ins> quux</blockquote>
+<blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
+</p></blockquote>
 !! end
 
 !! test
@@ -2426,7 +2436,6 @@ parsoid=wt2html
 </p>
 !! end
 
-# Parsoid doesn't strip empty tags, like Tidy does.
 !! test
 Empty pre; pre inside other HTML tags (T56946)
 !! wikitext
 foo
 </pre></div>
 <pre></pre>
-!! html/php
+!! html/php+tidy
 <p>a
 </p>
-<div><pre>
-foo
+<div><pre>foo
 </pre></div>
 <pre></pre>
-
-!! html/php+tidy
-<p>a</p>
-<div>
-<pre>
-foo
-</pre></div>
 !! html/parsoid
 <p>a</p>
 
@@ -2469,16 +2470,12 @@ HTML pre followed by indent-pre
 </pre>
 !! end
 
-# Note that tidy removes the empty <p> tags from the start and end.
-# Parsoid does not, by design.
 !! test
 Block tag pre
 !! wikitext
 <p><pre>foo</pre></p>
 !! html/php+tidy
-<pre>
-foo
-</pre>
+<p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
 !! html/parsoid
 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
 !! end
@@ -2641,10 +2638,8 @@ parsoid=wt2html
 <table>&lt;pre </table>
 
 !! html/php+tidy
-<pre>
-x
-</pre>
-<p>&lt;pre</p>
+<pre>x</pre>
+&lt;pre <table></table>
 !! html/parsoid
 <pre about="#mwt1" typeof="mw:Transclusion mw:Extension/pre" data-parsoid='{"a":{"&lt;pre":null},"sa":{"&lt;pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;pre &lt;pre>x&lt;/pre>"}},"i":0}}]}'>x</pre>
 
@@ -2694,6 +2689,17 @@ parsoid=wt2html
 </tbody></table>
 !! end
 
+!! test
+Self-closed pre
+!! wikitext
+<pre />
+!! html/php
+<pre></pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
+!! end
+
 !! test
 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
 !! options
@@ -2938,7 +2944,8 @@ Templates: Parsoid parameter escaping test 1
 !! wikitext
 {{echo|[foo]|{{echo|[bar]}}}}
 !! html/php+tidy
-<p>[foo]</p>
+<p>[foo]
+</p>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion"
 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
@@ -2949,9 +2956,10 @@ Parsoid: Pipes in external links in template parameter
 !! wikitext
 {{echo|[{{echo|http://example.com}} link]}}
 !! html/php+tidy
-<p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
+<p><a rel="nofollow" class="external text" href="http://example.com">link</a>
+</p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
 !! end
 
 !! test
@@ -2959,11 +2967,10 @@ Parsoid: pipe in transclusion parameter
 !! wikitext
 {{echo|http://foo.com/a&#124;b}}
 !! html/php+tidy
-<p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
+<p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
+</p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
-typeof="mw:Transclusion"
-data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&amp;#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&amp;#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
 !! end
 
 !! test
@@ -2973,7 +2980,8 @@ parsoid=html2wt,wt2wt
 !! wikitext
 {{echo|[http://foo.com/a&#124;b a&#124;b]}}
 !! html/php+tidy
-<p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
+<p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a&#124;b</a>
+</p>
 !! html/parsoid
 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
 typeof="mw:Transclusion"
@@ -3000,7 +3008,10 @@ parsoid=html2wt,wt2wt
 {{echo|<nowiki>&lt;div&gt;</nowiki>}}
 {{echo|<nowiki></nowiki>}}
 !! html/php+tidy
-<p>foo|bar &lt;div&gt;</p>
+<p>foo|bar
+&lt;div&gt;
+
+</p>
 !! html/parsoid
 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&amp;lt;div&amp;gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity">&lt;</span>div<span typeof="mw:Entity">&gt;</span></span>
@@ -3016,7 +3027,8 @@ parsoid=html2wt,wt2wt
 !! wikitext
 {{echo|{{echo|1=bar}}}}
 !! html/php+tidy
-<p>bar</p>
+<p>bar
+</p>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
 !! end
@@ -3027,7 +3039,8 @@ Templates parameters with special tokenizing behavior dont get modified because
 !! wikitext
 {{echo|a : b}}
 !! html/php+tidy
-<p>a&#160;: b</p>
+<p>a&#160;: b
+</p>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
 !! end
@@ -3038,7 +3051,8 @@ Templates: Preserve blank parameter names
 !! wikitext
 {{echo|=foo}}
 !! html/php+tidy
-<p>{{{1}}}</p>
+<p>{{{1}}}
+</p>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
 !! end
@@ -3048,7 +3062,9 @@ Templates: Preserve blank parameter names in other positions
 !! wikitext
 {{blank_param|bar|=foo}}
 !! html/php+tidy
-<p>bar foo</p>
+<p>bar
+foo
+</p>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
 foo</p>
  <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
 <pre><span> foo </span>
 </pre>
-!! html+tidy
-<p>a</p>
-<p>foo</p>
-<p>b</p>
-<div>foo</div>
-<p>c</p>
-<blockquote>
-<p>foo</p>
-</blockquote>
-<pre>
-<span> foo </span>
+!! html/php+tidy
+<p> a </p><p> foo </p><p>
+ b </p><div> foo </div><p>
+ c </p><blockquote><p> foo </p></blockquote>
+<pre><span> foo </span>
 </pre>
 !! end
 
 !! html/parsoid
 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
  b <div data-parsoid='{"stx":"html"}'> foo </div>
-!! html+tidy
-<pre>
-a <span>foo</span>
-</pre>
-<p>b</p>
-<div>foo</div>
+!! html/php+tidy
+<pre>a <span>foo</span>
+</pre><p>
+ b </p><div> foo </div>
 !!end
 
 !!test
@@ -3527,7 +3535,8 @@ a <!--
 foo
 --> b
 !! html/php+tidy
-<p>a b</p>
+<p>a  b
+</p>
 !! html/parsoid
 <p>a <!--
 foo
@@ -3558,11 +3567,8 @@ foo
 foo
 </pre>
 !! html/php+tidy
-<pre>
-foo
-</pre>
-<pre>
-foo
+<pre>foo</pre>
+<pre>foo
 </pre>
 <pre>
 
@@ -3759,7 +3765,7 @@ Definition list with news link containing colon
 <dd> This isn't even a real newsgroup!</dd></dl>
 
 !! html/parsoid
-<dl><dt>  <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
+<dl><dt>  <a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
 !! end
 
 !! test
@@ -3815,10 +3821,8 @@ Definition lists: excess closed tags
 !! wikitext
 ;one</b>two : bad tag fun
 !! html/php+tidy
-<dl>
-<dt>onetwo&#160;</dt>
-<dd>bad tag fun</dd>
-</dl>
+<dl><dt>onetwo&#160;</dt>
+<dd> bad tag fun</dd></dl>
 !! html/parsoid
 <dl>
 <dt>onetwo</dt>
@@ -4097,13 +4101,11 @@ Table / list interaction: lists nested in tables nested in indented lists
 
 !! test
 Definition Lists: Nesting: Multi-level (Parsoid only)
-!! options
-parsoid
 !! wikitext
 ;t1 :d1
 ;;t2 ::d2
 ;;;t3 :::d3
-!! html
+!! html/parsoid
 <dl>
   <dt>t1 </dt>
   <dd>d1</dd>
@@ -4126,72 +4128,26 @@ parsoid
 
 
 !! test
-Definition Lists: Nesting: Test 2 (Parsoid only)
+Definition Lists: Nesting: Test 2
 !! wikitext
 ;t1
 ::d2
-!! html/php+tidy
-<dl>
-<dt>t1</dt>
+!! html+tidy
+<dl><dt>t1</dt>
 <dd>
-<dl>
-<dd>d2</dd>
-</dl>
-</dd>
-</dl>
-!! html/parsoid
-<dl>
-  <dt>t1</dt>
-  <dd>
-    <dl>
-      <dd>d2</dd>
-    </dl>
-  </dd>
-</dl>
-
+<dl><dd>d2</dd></dl></dd></dl>
 !! end
 
 
 !! test
-Definition Lists: Nesting: Test 3 (Parsoid only)
+Definition Lists: Nesting: Test 3
 !! wikitext
 :;t1
 ::::d2
-!! html/php+tidy
-<dl>
-<dd>
-<dl>
-<dt>t1</dt>
-<dd>
-<dl>
+!! html+tidy
+<dl><dd><dl><dt>t1</dt>
 <dd>
-<dl>
-<dd>d2</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-</dl>
-!! html/parsoid
-<dl>
-  <dd>
-    <dl>
-      <dt>t1</dt>
-      <dd>
-        <dl>
-          <dd>
-            <dl>
-              <dd>d2</dd>
-            </dl>
-          </dd>
-        </dl>
-      </dd>
-    </dl>
-  </dd>
-</dl>
-
+<dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
 !! end
 
 
@@ -4225,21 +4181,9 @@ Definition Lists: Mixed Lists: Test 1
 <dl><dt> baz</dt></dl></dd></dl>
 
 !! html/php+tidy
-<dl>
-<dd>
-<dl>
-<dd>
-<ul>
-<li>foo</li>
-<li>bar</li>
-</ul>
-</dd>
-</dl>
-<dl>
-<dt>baz</dt>
-</dl>
-</dd>
-</dl>
+<dl><dd><dl><dt><ul><li> foo</li>
+<li> bar</li></ul></dt></dl>
+<dl><dt> baz</dt></dl></dd></dl>
 !! html/parsoid
 <dl>
 <dd><dl>
@@ -4363,27 +4307,28 @@ Definition Lists: Mixed Lists: Test 10
 
 !! end
 
+# The Parsoid team disagrees with the PHP parser's seemingly-random
+# rules regarding dd/dt on the next few tests.  Parsoid is more
+# consistent, and recognizes the shared nesting and keeps the
+# still-open tags around until the nesting is complete.
+
 # This is a regression test for T175099
-# html/php+tidy is insufficient since Tidy covers up the bug.
-# But once Tidy is replaced with RemexHTML, html/php+tidy is good enough
 !! test
 Definition Lists: Mixed Lists: Test 11
 !! wikitext
-; a
-:* b
-!! html/*
-<dl><dt> a</dt>
+;a
+:*b
+!! html/php
+<dl><dt>a</dt>
 <dd>
-<ul><li> b</li></ul></dd></dl>
+<ul><li>b</li></ul></dd></dl>
 
+!! html/parsoid
+<dl><dt>a
+<dd><ul><li>b</li></ul></dd></dl>
 !! end
 
-# The Parsoid team disagrees with the PHP parser's seemingly-random
-# rules regarding dd/dt on the next two tests.  Parsoid is more
-# consistent, and recognizes the shared nesting and keeps the
-# still-open tags around until the nesting is complete.
-# (And tidy again converts <dt> to <dd> before 'bar'.)
-
+# FIXME: Maybe get rid of this test?
 !! test
 Definition Lists: Mixed Lists: Test 12
 !! wikitext
@@ -4396,42 +4341,10 @@ Definition Lists: Mixed Lists: Test 12
 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
 
 !! html/php+tidy
-<ul>
-<li>
-<ol>
-<li>
-<ul>
-<li>
-<ol>
-<li>
-<dl>
-<dt>foo&#160;</dt>
-<dd>
-<ul>
-<li>
-<dl>
-<dd>
-<dl>
-<dt>bar</dt>
-</dl>
-</dd>
-</dl>
-</li>
-</ul>
-</dd>
-</dl>
-<dl>
-<dt>boo&#160;</dt>
-<dd>baz</dd>
-</dl>
-</li>
-</ol>
-</li>
-</ul>
-</li>
-</ol>
-</li>
-</ul>
+<ul><li><ol><li><ul><li><ol><li><dl><dt>foo&#160;</dt>
+<dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
+<dl><dt>boo&#160;</dt>
+<dd>baz</dd></dl></li></ol></li></ul>
 !! html/parsoid
 <ul>
 <li>
@@ -4462,8 +4375,7 @@ Definition Lists: Mixed Lists: Test 12
 </ul>
 !! end
 
-
-# Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
+# FIXME: Maybe get rid of this test?
 # From whitelist:
 # * The test is wrong, there are two colons where there should be :;
 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
@@ -4471,43 +4383,9 @@ Definition Lists: Mixed Lists: Test 12
 Definition Lists: Weird Ones: Test 1
 !! wikitext
 *#;*::;; foo : bar (who uses this?)
-!! html/php
-<ul><li><ol><li><dl><dt> foo&#160;</dt>
-<dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
-
 !! html/php+tidy
-<ul>
-<li>
-<ol>
-<li>
-<dl>
-<dt>foo&#160;</dt>
-<dd>
-<ul>
-<li>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dt>bar (who uses this?)</dt>
-</dl>
-</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-</dl>
-</li>
-</ul>
-</dd>
-</dl>
-</li>
-</ol>
-</li>
-</ul>
+<ul><li><ol><li><dl><dt> foo&#160;</dt>
+<dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
 !! html/parsoid
 <ul>
 <li>
@@ -4550,37 +4428,18 @@ Definition Lists: colons occurring in tags
 ;{{echo|''a:b''}}
 ;;;''a:b''
 !! html+tidy
-<dl>
-<dt>a</dt>
+<dl><dt>a</dt>
 <dd>b</dd>
 <dt><b>a:b</b></dt>
 <dt><i>a:b</i></dt>
 <dt><span>a:b</span></dt>
-<dd>
-<div>a:b</div>
-</dd>
-<dd>
-<div>a
-<dl>
+<dt><div>a:b</div></dt>
+<dt><div>a</div></dt>
 <dd>b</dd>
-</dl>
-</div>
-</dd>
 <dt>a</dt>
 <dd>b</dd>
-<dt><i>a:b</i></dt>
-</dl>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dt><i>a:b</i></dt>
-</dl>
-</dd>
-</dl>
-</dd>
-</dl>
+<dt><i>a:b</i></dt></dl>
+<dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
 !! html/parsoid
 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
 <dt><b>a:b</b></dt>
@@ -4594,6 +4453,9 @@ Definition Lists: colons occurring in tags
 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
 !! end
 
+# Parsoid's output differs here again because it shares
+# nesting between the two lists unlike the PHP parser.
+# Unsure which is more desirable.
 !! test
 Definition Lists: colons and tables 1
 !! wikitext
@@ -4603,7 +4465,7 @@ Definition Lists: colons and tables 1
 :{|
 | y
 |}
-!! html
+!! html/php
 <dl><dd><table>
 <tr>
 <td> x
@@ -4613,22 +4475,6 @@ Definition Lists: colons and tables 1
 <td> y
 </td></tr></table></dd></dl>
 
-!! end
-
-# Parsoid's output (as documented below) differs from php's in this case.
-# This is probably a bug. If we fixup parsoid to match php's output, the
-# above test should pass and the below test case can be removed. It is
-# unclear which output is more desirable.
-
-!! test
-Definition Lists: colons and tables 2
-!! wikitext
-:{|
-| x
-|}
-:{|
-| y
-|}
 !! html/parsoid
 <dl><dd><table>
 <tr>
@@ -4640,6 +4486,7 @@ Definition Lists: colons and tables 2
 </td></tr></table></dd></dl>
 !! end
 
+# FIXME: Does this need a html/php section?
 !! test
 Definition Lists: template interaction
 !! wikitext
@@ -4688,9 +4535,9 @@ Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net
 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
 </p>
 !! html/parsoid
-<p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
-Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
-Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
+<p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
+Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
+Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
 !!end
 
 !! test
@@ -4729,7 +4576,7 @@ External links: dollar sign in URL (autonumber)
 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
 !!end
 
 !! test
@@ -4742,7 +4589,7 @@ http://example.com/1[2345
 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
 !! end
 
 !! test
@@ -4755,7 +4602,7 @@ parsoid=wt2html,html2html
 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
 !!end
 
 # parsoid adds a space before the link name
@@ -4816,7 +4663,7 @@ External links: protocol-relative URL in brackets without text
 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="//example.com"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
 !! end
 
 !! test
@@ -4854,7 +4701,7 @@ parsoid=wt2html,wt2wt
 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
 !! end
@@ -4903,25 +4750,25 @@ http://example.com/url_with_entity&#60;
 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&#60;
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
-<a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
-(<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;lt;","srcContent":"&lt;"}'>&lt;</span>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x3C;","srcContent":"&lt;"}'>&lt;</span>
-<a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#60;","srcContent":"&lt;"}'>&lt;</span></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
+(<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;lt;","srcContent":"&lt;"}'>&lt;</span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x3C;","srcContent":"&lt;"}'>&lt;</span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#60;","srcContent":"&lt;"}'>&lt;</span></p>
 !! end
 
 !! test
@@ -4934,7 +4781,7 @@ http://example.com/url_with_entity&amp;amp;
 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp;amp">http://example.com/url_with_entity&amp;amp</a>;
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp;amp">http://example.com/url_with_entity&amp;amp</a>;</p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;amp">http://example.com/url_with_entity&amp;amp</a>;</p>
 !! end
 
 !! test
@@ -4949,7 +4796,7 @@ news:'a'b''c''d e
 </p>
 !! html/parsoid
 <p><b>News:</b> Stuff here</p>
-<p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
+<p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
 !! end
 
 !! test
@@ -4960,7 +4807,7 @@ External links: with entity
 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&amp;#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&amp;#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
 !! end
 
 !! test
@@ -5093,7 +4940,7 @@ URL in text: [http://example.com http://example.com]
 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
 </p>
 !! html/parsoid
-<p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
+<p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
 !! end
 
 !! test
@@ -5104,7 +4951,7 @@ ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/
 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
 </p>
 !! html/parsoid
-<p>ja-style clickable images: <a rel="mw:ExtLink" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
+<p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
 !! end
 
 !! test
@@ -5124,7 +4971,7 @@ Old &amp; use: http://x&amp;y
 <p>Old &amp; use: <a rel="nofollow" class="external free" href="http://x&amp;y">http://x&amp;y</a>
 </p>
 !! html/parsoid
-<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" href="http://x&amp;y">http://x&amp;y</a></p>
+<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&amp;y">http://x&amp;y</a></p>
 !! end
 
 !! test
@@ -5135,7 +4982,7 @@ http://example.com/?foo&#61;bar
 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
 !! end
 
 ##
@@ -5152,7 +4999,7 @@ Old &amp; use: [http://x&y]
 <p>Old &amp; use: <a rel="nofollow" class="external autonumber" href="http://x&amp;y">[1]</a>
 </p>
 !! html/parsoid
-<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" href="http://x&amp;y"></a></p>
+<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&amp;y"></a></p>
 !! end
 
 # note that parsoid html is identical to [raw ampersand] case; so html2wt
@@ -5167,7 +5014,7 @@ Old &amp; use: [http://x&amp;y]
 <p>Old &amp; use: <a rel="nofollow" class="external autonumber" href="http://x&amp;y">[1]</a>
 </p>
 !! html/parsoid
-<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" href="http://x&amp;y"></a></p>
+<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&amp;y"></a></p>
 !! end
 
 !! test
@@ -5178,7 +5025,7 @@ External links: [raw equals]
 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
 !! end
 
 # note that parsoid html is identical to [raw equals] case; so html2wt
@@ -5193,7 +5040,7 @@ parsoid=wt2html,wt2wt,html2html
 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
 !! end
 
 # xxx parsoid strips the IDN character, so the round-trip tests will
@@ -5208,7 +5055,7 @@ parsoid=wt2html,wt2wt,html2html
 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
 !! end
 
 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
@@ -5240,7 +5087,7 @@ http://e&zwnj;xample.com/
 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
 !! end
 
 !! test
@@ -5261,7 +5108,7 @@ External links: URL within URL (T2002)
 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
 !! end
 
 !! test
@@ -5299,7 +5146,7 @@ http://www.example.com/<b>html</b>
 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
 !! end
 
 !! test
@@ -5358,17 +5205,22 @@ External links: link text with spaces
 </p>
 !! end
 
+# Note edge case difference between PHP and Parsoid here.
 !! test
 External links: wiki links within external link (T5695)
 !! options
 parsoid=wt2html,html2html
 !! wikitext
 [http://example.com [[wikilink]] embedded in ext link]
+
+[http://example.com test [[wikilink]] embedded in ext link]
 !! html/php
 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&amp;action=edit&amp;redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
+</p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&amp;action=edit&amp;redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
 !! end
 
 !! test
@@ -5412,8 +5264,8 @@ parsoid=wt2html
 </p><p>{{echo|[[Foo}}
 </p>
 !! html/parsoid
-<p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
-<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
+<p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
 <p>[[Foo</p>
 <p>{{echo|[[Foo}}</p>
 !! end
@@ -5476,7 +5328,7 @@ http://www.example.com/?title=AT%26T
 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
 !! end
 
 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
@@ -5489,7 +5341,7 @@ http://www.example.com/?title=100%25_Bran
 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
 !! end
 
 !! test
@@ -5500,7 +5352,7 @@ http://www.example.com/?title=Ben-Hur_%281959_film%29
 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
 !! end
 
 
@@ -5512,7 +5364,7 @@ T6781: %26 in autonumber URL
 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
 !! end
 
 !! test
@@ -5523,7 +5375,7 @@ T6781, T7267: %26 in autonumber URL
 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
 !! end
 
 !! test
@@ -5534,7 +5386,7 @@ T6781, T7267: %28, %29 in autonumber URL
 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
 !! end
 
 
@@ -5546,7 +5398,7 @@ T6781: %26 in bracketed URL
 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
 !! end
 
 !! test
@@ -5566,7 +5418,7 @@ T6781, T7267: %28, %29 in bracketed URL
 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
 !! end
 
 !! test
@@ -5580,8 +5432,8 @@ External link containing a period in the anchor. (T65947)
 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
-<p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
 !! end
 
 !! test
@@ -5595,8 +5447,8 @@ External link containing a single quote. (T65947)
 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar&#39;baz">bang</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
-<p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
+<p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
 !! end
 
 !! test
@@ -5617,17 +5469,16 @@ External link containing double-single-quotes in text embedded in italics (T6598
 </p>
 !! end
 
+# Don't add the html/php section since the output is broken and there isn't any reason to spec it
 !! test
 External link containing double-single-quotes with no space separating the url from text in italics
 !! wikitext
 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
-!! html/php
-<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&amp;action=edit&amp;redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
-</p>
 !! html/php+tidy
-<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de</a> <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&amp;action=edit&amp;redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</p>
+<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&amp;action=edit&amp;redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
+</p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
 !! end
 
 !! test
@@ -5638,7 +5489,7 @@ External link with comments in link text
 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
 !! end
 
 !! test
@@ -5649,7 +5500,7 @@ External link to bare IPv4 address
 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
 !! end
 
 !! test
@@ -5681,9 +5532,9 @@ http://example.com/index.php?foozoid&#x5B;&#x5D;=bar
 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
 
-<p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&amp;#x5B;&amp;#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&amp;#x5B;&amp;#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
 !! end
 
 !! test
@@ -5729,24 +5580,24 @@ Examples from RFC 2732, section 2:
 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
 
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
 
-<p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
-<ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
-<li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
+<ul><li> <a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
 
-<p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
-<ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
-<li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
-<li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
-<li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
-<li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
+<ul><li> <a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
+<li> <a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
 !! end
 
 !! test
@@ -5792,24 +5643,24 @@ Examples from RFC 2732, section 2:
 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
 
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
 
-<p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
-<ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
-<li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
+<ul><li> <a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
 
-<p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
-<ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
-<li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
-<li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
-<li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
-<li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
-<li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
+<ul><li> <a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
+<li> <a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
 !! end
 
 !! test
@@ -5849,13 +5700,13 @@ Non-extlinks in brackets
 [foo <i>bar</i>]
 [fool's] errand
 [fool's errand]
-[<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
-[<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
-[<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
-[<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l&#39;s"}'>fool's</span>] errand
-[<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l&#39;s"}'>fool's</span> errand]
-[<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
-[url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
+[<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
+[<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
+[<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
+[<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
+[<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
+[url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
+[url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
 [http:// bare protocols don't count]</p>
 !! end
 
@@ -5867,8 +5718,7 @@ Percent encoding in external links
 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&amp;q=ResourceLoader+%40wikimedia">Search</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink"
-href="https://github.com/search?l=&amp;q=ResourceLoader+%40wikimedia">Search</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&amp;q=ResourceLoader+%40wikimedia">Search</a></p>
 !! end
 
 !! test
@@ -5879,7 +5729,7 @@ http://example.com
 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
 !! end
 
 !! test
@@ -5911,14 +5761,14 @@ http://example.com/a)b
 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
-<p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
-<p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
-<p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
-<p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
-<p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
-<p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
-<p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
+<p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
+<p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
 !! end
 
 !! test
@@ -5932,9 +5782,9 @@ Parenthesis in external links, w/ transclusion or comment
 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
 </p>
 !! html/parsoid
-<p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}&#39;>hi&lt;/span>"}]]}'>http://example.com/hi</a>)</p>
+<p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}&#39;>hi&lt;/span>"}]]}'>http://example.com/hi</a>)</p>
 
-<p>(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com&lt;!-- hi -->"}}'>http://example.com</a>)</p>
+<p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com&lt;!-- hi -->"}}'>http://example.com</a>)</p>
 !! end
 
 !! test
@@ -6420,15 +6270,12 @@ Accept "!!" in table data of mixed wikitext / html syntax
 !a
 <tr><td>b!!c</td></tr>
 |}
-!! html+tidy
+!! html/php+tidy
 <table>
-<tr>
-<th>a</th>
-</tr>
-<tr>
-<td>b!!c</td>
-</tr>
-</table>
+<tbody><tr>
+<th>a
+</th></tr><tr><td>b!!c</td></tr>
+</tbody></table>
 !! html/parsoid
 <table>
 <tbody><tr><th>a</th></tr>
@@ -6630,7 +6477,7 @@ parsoid=wt2html,html2html
 !! html/parsoid
 <table><tbody>
 <tr>
-<td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
+<td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
 !! end
 
 !! test
@@ -6719,7 +6566,7 @@ Don't break on | in extension attribute in template
 
 <references />
 !! html/parsoid
-<p><span about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;ref name=\"hi|ho\">ha&lt;/ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
+<p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;ref name=\"hi|ho\">ha&lt;/ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
 
 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
 !! end
@@ -6894,7 +6741,7 @@ T107652: <ref>s in templates that also generate table cell attributes should be
 <references />
 !! html/parsoid
 <table>
-<tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
+<tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
 </tbody></table>
 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
 !! end
@@ -6991,10 +6838,10 @@ Wikitext table comments represented in parsoid dom
 |}
 !! html/php+tidy
 <table>
-<tr>
-<td>x</td>
-</tr>
-</table>
+
+<tbody><tr>
+<td> x
+</td></tr></tbody></table>
 !! html/parsoid
 <table><!--c1--><!--c2-->
 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
@@ -7164,7 +7011,7 @@ Wikitext table with html-syntax row
 !! end
 
 !! test
-Implicit <td> after a |-
+Fostered content in tables: Plain text
 !! options
 parsoid=wt2html,html2html
 !! wikitext
@@ -7179,7 +7026,10 @@ a
 </table>
 
 !! html/php+tidy
-<p>a</p>
+
+
+a
+<table></table>
 !! html/parsoid
 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
@@ -7188,7 +7038,7 @@ a
 !! end
 
 !! test
-Lists should be recognized in an implicit <td> context
+Fostered content in tables: Lists
 !! options
 parsoid=wt2html,html2html
 !! wikitext
@@ -7203,9 +7053,10 @@ parsoid=wt2html,html2html
 </table>
 
 !! html/php+tidy
-<ul>
-<li>a</li>
-</ul>
+<ul><li>a</li></ul><table>
+
+
+</table>
 !! html/parsoid
 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
@@ -7214,20 +7065,20 @@ parsoid=wt2html,html2html
 !! end
 
 !! test
-Table cells not properly parsed in an implicit-td context
+Template generated table cell with attributes
 !! wikitext
 {|
 |-
 {{table_attribs_4}} || a || b
-|}
-!! html/php+tidy
-<table>
-<tr>
-<td style="background-color:#DC241f;" width="10px"></td>
-<td>a</td>
-<td>b</td>
-</tr>
-</table>
+|}
+!! html/php+tidy
+<table>
+
+<tbody><tr>
+<td style="background-color:#DC241f;" width="10px"> </td>
+<td> a </td>
+<td> b
+</td></tr></tbody></table>
 !! html/parsoid
 <table>
 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
@@ -7248,17 +7099,14 @@ parsoid=wt2html,wt2wt
 |}<b>quux</b>
 !! html+tidy
 <table>
-<tr>
-<td>foo</td>
-</tr>
-</table>
-<p>bar</p>
-<table>
-<tr>
-<td>baz</td>
-</tr>
-</table>
-<p><b>quux</b></p>
+<tbody><tr>
+<td>foo
+</td></tr></tbody></table><p> bar
+</p><table>
+<tbody><tr>
+<td>baz
+</td></tr></tbody></table><p><b>quux</b>
+</p>
 !! end
 
 !! test
@@ -7330,12 +7178,11 @@ foo
 |}
 !!html/php+tidy
 <table class="foo">
-<tr>
+<tbody><tr>
 <td class="bar">
-<p>foo</p>
-</td>
-</tr>
-</table>
+<p>foo
+</p>
+</td></tr></tbody></table>
 !!html/parsoid
 <table class="foo">
 <tr>
@@ -7409,24 +7256,28 @@ parsoid=html2wt
 |}
 !! html/php+tidy
 <table>
-<caption>Test</caption>
-<tr>
-<th>Month</th>
-<th>Savings</th>
-</tr>
+<caption>Test
+</caption>
+<tbody><tr>
+<th>Month
+</th>
+<th>Savings
+</th></tr>
 <tr>
-<td>January</td>
-<td>$100</td>
-</tr>
+<td>January
+</td>
+<td>$100
+</td></tr>
 <tr>
-<td>February</td>
-<td>$80</td>
-</tr>
+<td>February
+</td>
+<td>$80
+</td></tr>
 <tr>
-<td>Sum</td>
-<td>$180</td>
-</tr>
-</table>
+<td>Sum
+</td>
+<td>$180
+</td></tr></tbody></table>
 !! end
 
 # T137406: No whitespace in the HTML
@@ -8127,7 +7978,7 @@ Plain link to URL
 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
 </p>
 !! html/parsoid
-<p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
+<p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
 !! end
 
 !! test
@@ -8147,7 +7998,7 @@ Plain link to protocol-relative URL
 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
 </p>
 !! html/parsoid
-<p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
+<p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
 !! end
 
 !! test
@@ -8190,7 +8041,7 @@ Piped link to URL: [[http://www.example.com|an example URL]]
 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
 </p>
 !! html/parsoid
-<p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
+<p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
 !! end
 
 !! test
@@ -8212,13 +8063,13 @@ parsoid=wt2html
 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a> 
 </p>
 !! html/parsoid
-<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">http://www.example.com</a> </p>
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
 
-<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">|123</a>]</p>
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
 
-<p>{{echo|[<a rel="mw:ExtLink" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
+<p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
 
-<p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">http://www.example.com</a> </p>
+<p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
 !! end
 
 !! test
@@ -8239,11 +8090,9 @@ T2337: Escaped self-links should be bold
 title=[[Bug462]]
 !! wikitext
 [[Bu&#103;462]] [[Bug462]]
-!! html/php
+!! html/php+tidy
 <p><a class="mw-selflink selflink">Bu&#103;462</a> <a class="mw-selflink selflink">Bug462</a>
 </p>
-!! html/php+tidy
-<p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
 !! html/parsoid
 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
 !! end
@@ -8684,7 +8533,7 @@ parsoid=wt2html,wt2wt
 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteni&#355;a</a></li>
 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteni&#355;a</a></li></ul>
 
-!! html+tidy
+!! html/php+tidy
 <ul>
 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
@@ -8796,8 +8645,8 @@ Interwiki links that cannot be represented in wiki syntax
 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
-<a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
-<a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
+<a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
+<a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
 !! end
 
 !! test
@@ -9475,8 +9324,9 @@ parsoid=wt2html
 
 <br/ >
 !! html+tidy
-<p><br /></p>
-<p><br /></p>
+<p><br />
+</p><p><br />
+</p>
 !! end
 
 !! test
@@ -9568,10 +9418,9 @@ foo <hr
 > bar
 !! html+tidy
 <hr />
-<hr />
-<p>foo</p>
-<hr />
-<p>bar</p>
+<hr /><p>
+foo </p><hr /><p> bar
+</p>
 !! end
 
 !! test
@@ -9620,8 +9469,8 @@ Horizontal ruler -- Supports content following dashes on same line
 <hr /> Foo
 
 !! html+tidy
-<hr />
-<p>Foo</p>
+<hr /><p> Foo
+</p>
 !! end
 
 ###
@@ -9922,11 +9771,10 @@ Multiple list tags generated by templates
 </li>
 
 !! html+tidy
-<ul>
-<li>a</li>
-<li>b</li>
-<li>c</li>
-</ul>
+<li>a
+</li><li>b
+</li><li>c
+</li>
 !!end
 
 !!test
@@ -9966,9 +9814,10 @@ Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
 
 !!end
 
+# FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
+# That pass could possibly be removed.
 !!test
-Test the li-hack
-(The PHP parser relies on Tidy for the hack)
+Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
 !!options
 parsoid=wt2html,wt2wt
 !! wikitext
@@ -9982,14 +9831,13 @@ parsoid=wt2html,wt2wt
 </li>
 </ul>
 !! html+tidy
+<ul><li> foo</li>
+<li class="mw-empty-elt"> </li><li>li-hack</li>
+<li class="mw-empty-elt"> </li><li>templated li-hack</li>
+<li class="mw-empty-elt">  </li><li> unsupported li-hack with preceding comments</li></ul>
 <ul>
-<li>foo</li>
-<li>li-hack</li>
-<li>templated li-hack</li>
-<li>unsupported li-hack with preceding comments</li>
-</ul>
-<ul>
-<li>not a li-hack</li>
+<li class="mw-empty-elt"></li><li>not a li-hack
+</li>
 </ul>
 !! html/parsoid
 <ul><li> foo</li>
@@ -10048,69 +9896,71 @@ parsoid
 # tags (parse, minimize scope of fixup, and roundtrip back)
 # ------------------------------------------------------------------------
 
+# Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
+# Parsoid's list handling is more aware of block structure.
 !! test
 Unbalanced closing block tags break a list
-(php parser relies on Tidy to fix up)
 !! wikitext
 <div>
 *a</div><div>
 *b</div>
 !! html+tidy
 <div>
-<ul>
+<ul><li>a</li></ul></div><div>
+<li>b</li></div>
+!! html+parsoid
+<div><ul>
 <li>a</li>
-</ul>
-</div>
-<div>
-<ul>
+</ul></div>
+<div><ul>
 <li>b</li>
-</ul>
-</div>
+</ul></div>
 !! end
 
-# Parsoid fails this test, but it might be tricky to support properly.
-# See T70395.
 !! test
 Unbalanced closing non-block tags don't break a list
-(php parser relies on Tidy to fix up)
 !! wikitext
 <span>
 *a</span><span>
 *b</span>
 !! html/php+tidy
-<ul>
-<li><span>a</span></li>
-<li><span>b</span></li>
-</ul>
+<p><span>
+</span></p>
+<ul><li>a<span></span></li>
+<li>b</li></ul>
 !! html/parsoid
 <span>
 <ul>
-<li>a<span></span>
-</li>
-<li>b
-</li>
+<li>a<span></span></li>
+<li>b</li>
 </ul>
 </span>
 !! end
 
+# Parsoid does some post-dom-building cleanup
+# which is why its output differs from Remex.
 !! test
 Unclosed formatting tags that straddle lists are closed and reopened
-(php parser relies on Tidy to fix up)
 !! options
 parsoid=wt2html,wt2wt,html2html
 !! wikitext
 # <s> a
 # b </s>
 !! html/php+tidy
-<ol>
-<li><s>a</s></li>
-<li><s>b</s></li>
-</ol>
+<ol><li> <s> a</s></li><s>
+</s><li><s> b </s></li></ol>
 !! html/parsoid
-<ol><li> <s> a</s></li>
+<ol><li> <s> a</s><s></s></li>
 <li><s> b </s></li></ol>
 !! end
 
+# Output is ugly because of all the misnested tag fixups.
+# Remex is wrapping p-tags around empty elements.
+# Parsoid has special-case handling of this pattern of
+# wrapping lists in formatting tags.
+# FIXME: Should we remove this code from Parsoid? Or add
+# special support in Remex? If the latter, maybe just wait
+# for Parsoid to become the default parser.
 # See T70395.
 !!test
 1. List embedded in a formatting tag
@@ -10119,9 +9969,9 @@ parsoid=wt2html,wt2wt,html2html
 * foo
 </small>
 !! html/php+tidy
-<ul>
-<li><small>foo</small></li>
-</ul>
+<p><small>
+</small></p><small><ul><li> foo</li></ul></small><small></small><p><small></small>
+</p>
 !! html/parsoid
 <small>
 <ul>
@@ -10130,19 +9980,19 @@ parsoid=wt2html,wt2wt,html2html
 </small>
 !!end
 
-## Ugly Parsoid output here
-## Not sure what the right output is.
+# Output is ugly because of all the misnested tag fixups
+# Remex is wrapping p-tags around empty elements.
+# Parsoid has code that strips useless p-tags.
 !!test
-2. List embedded in a formatting tag
+2. List embedded in a formatting tag in a misnested way
 !! wikitext
 <small>
 *a
 *b</small>
 !! html/php+tidy
-<ul>
-<li><small>a</small></li>
-<li><small>b</small></li>
-</ul>
+<p><small>
+</small></p><small></small><ul><small><li>a</li>
+</small><li><small>b</small></li></ul>
 !! html/parsoid
 <small></small>
 <ul><small>
@@ -10152,31 +10002,6 @@ parsoid=wt2html,wt2wt,html2html
 </ul>
 !!end
 
-# Ugly Parsoid and PHP parser output here
-# Not sure if we want to make this a test!
-#
-## !!test
-## 3. Unclosed formatting tags in list elements
-## !! wikitext
-## *<small>a
-## *<small>b
-## !! html/php+tidy
-## <ul>
-## <li><small>a</small></li>
-## <li><small><small>b</small></small></li>
-## </ul>
-## !! html/parsoid
-## <ul>
-## <li><small>a</small></li>
-## <small>
-## <li><small>b</small></li>
-## </small></ul>
-## !!end
-
-# This is a bug in the PHP parser + tidy combination.
-# (The </tr> tag gets parsed as text and html-escaped by PHP,
-# and then fostered out of the table by tidy.)
-# We believe the Parsoid output to be correct.
 !! test
 Table with missing opening <tr> tag
 !! options
@@ -10188,10 +10013,9 @@ parsoid=wt2html,wt2wt
 </table>
 !! html+tidy
 <table>
-<tr>
-<td>foo</td>
+<tbody><tr><td>foo</td>
 </tr>
-</table>
+</tbody></table>
 !! end
 
 ###
@@ -10669,11 +10493,9 @@ title=[['foo & bar = baz']]
 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
 !! wikitext
 ''{{PAGENAME}}''
-!! html/php
+!! html+tidy
 <p><i>&#39;foo &#38; bar &#61; baz&#39;</i>
 </p>
-!! html+tidy
-<p><i>'foo &amp; bar = baz'</i></p>
 !! end
 
 !! test
@@ -10683,11 +10505,9 @@ title=[[*RFC 1234 http://example.com/]]
 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
 !! wikitext
 {{PAGENAME}}
-!! html/php
+!! html+tidy
 <p>&#42;RFC&#32;1234 http&#58;//example.com/
 </p>
-!! html+tidy
-<p>*RFC 1234 http://example.com/</p>
 !! end
 
 !! test
@@ -10709,11 +10529,9 @@ title=[[*RFC 1234 http://example.com/]]
 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
 !! wikitext
 {{PAGENAMEE}}
-!! html/php
+!! html+tidy
 <p>&#42;RFC_1234_http&#58;//example.com/
 </p>
-!! html+tidy
-<p>*RFC_1234_http://example.com/</p>
 !! end
 
 !! test
@@ -11053,7 +10871,7 @@ RFC 822
 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
 </p>
 !! html/parsoid
-<p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
+<p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
 !! end
 
 !! test
@@ -11064,7 +10882,7 @@ This is RFC 822 but thisRFC 822 is not RFC 822linked.
 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
 </p>
 !! html/parsoid
-<p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
+<p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
 !! end
 
 !! test
@@ -11079,7 +10897,7 @@ RFC
 822
 </p>
 !! html/parsoid
-<p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 822</a>
+<p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 822</a>
 RFC
 822</p>
 !! end
@@ -11137,7 +10955,7 @@ PMID 1234
 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
 </p>
 !! html/parsoid
-<p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
+<p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
 !! end
 
 !! test
@@ -11148,7 +10966,7 @@ This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
 </p>
 !! html/parsoid
-<p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
+<p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
 !! end
 
 !! test
@@ -11163,7 +10981,7 @@ PMID
 1234
 </p>
 !! html/parsoid
-<p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 1234</a>
+<p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 1234</a>
 PMID
 1234</p>
 !! end
@@ -11182,7 +11000,7 @@ X[https://tools.ietf.org/html/rfc1234 foo]
 </p>
 !! html/parsoid
 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
-<p>X<a rel="mw:ExtLink" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
+<p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
 !! end
 
 !! test
@@ -11474,12 +11292,7 @@ Template with thumb image (with link in description)
 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&amp;wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a>  <div class="thumbcaption"><a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
 
 !! html+tidy
-<p>This is a test template with parameter</p>
-<div class="thumb tright">
-<div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&amp;wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a>
-<div class="thumbcaption"><a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">caption</a></div>
-</div>
-</div>
+<p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&amp;wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a>  <div class="thumbcaption"><a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
 !! end
@@ -11763,21 +11576,13 @@ Templates with intersecting and overlapping ranges
 {{echo|{{!}}hi}}
 |}
 !! html/php+tidy
-<p>ha</p>
-<p>ho</p>
-<table>
-<tr>
-<td></td>
-</tr>
-<tr>
-<td>hi</td>
-</tr>
-</table>
-<table>
-<tr>
-<td></td>
-</tr>
-</table>
+<p>ha</p><table>
+
+</table><p>ho</p><table>
+
+<tbody><tr>
+<td>hi
+</td></tr></tbody></table>
 !! html/parsoid
 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n&lt;p>ha&lt;/p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n&lt;p>ho&lt;/p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
 
@@ -12486,30 +12291,21 @@ tag, nothing bad happens:
 {{echo|<tag>foo-{bar}bat</tag>}}
 
 !! html/php+tidy
-<p>This form breaks the template, which is unfortunate:</p>
-<ul>
-<li>{{echo|foo-{bar}bat}}</li>
-</ul>
-<p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
-<ul>
-<li>foo-{bar}bat</li>
-<li>foo-{bar}bat</li>
-<li>
-<pre>
-foo-{bar}bat
-</pre></li>
-<li>
-<pre>
-foo-{bar}bat
-</pre></li>
-</ul>
-<pre>
-'foo-{bar}bat'
+<p>This form breaks the template, which is unfortunate:
+</p>
+<ul><li> {{echo|foo-{bar}bat}}</li></ul>
+<p>But if the broken language converter markup is inside an extension
+tag, nothing bad happens:
+</p>
+<ul><li> foo-&#123;bar}bat</li>
+<li> foo-&#123;bar}bat</li>
+<li> <pre>foo-{bar}bat</pre></li>
+<li> <pre>foo-{bar}bat</pre></li></ul>
+<pre>'foo-{bar}bat'
 array (
 )
 </pre>
-<pre>
-'foo-{bar}bat'
+<pre>'foo-{bar}bat'
 array (
 )
 </pre>
@@ -12537,16 +12333,14 @@ parsoid=wt2html
 * [http://example.com Example in -{link} description]
 * {{echo|[http://example.com/-{foo Breaks template, however]}}
 !! html/php+tidy
-<ul>
-<li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
-<li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
-<li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
-</ul>
+<ul><li> <a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
+<li> <a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
+<li> {{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
 !! html/parsoid
 <ul>
-<li><a rel="mw:ExtLink" href="http://example.com/-{foo">Example in URL</a></li>
-<li><a rel="mw:ExtLink" href="http://example.com">Example in -{link} description</a></li>
-<li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
+<li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
+<li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
 </ul>
 !! end
 
@@ -12557,11 +12351,9 @@ Preprocessor precedence 14: broken language converter in comment
 * <!---{{foo}}--> ...extra dashes
 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
 !! html/php+tidy
-<ul>
-<li>...should be ok</li>
-<li>...extra dashes</li>
-<li>foobat ...should be ok</li>
-</ul>
+<ul><li>  ...should be ok</li>
+<li>  ...extra dashes</li>
+<li> foobat ...should be ok</li></ul>
 !! html/parsoid
 <ul>
 <li><!--{{foo}}--> ...should be ok</li>
@@ -12592,17 +12384,23 @@ __NOTOC__ __NOEDITSECTION__
 6
 !! html/php+tidy
 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
-<p>1</p>
+<p>1
+</p>
 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
-<p>2</p>
+<p>2
+</p>
 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
-<p>3</p>
+<p>3
+</p>
 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
-<p>4</p>
+<p>4
+</p>
 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
-<p>5</p>
+<p>5
+</p>
 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
-<p>6</p>
+<p>6
+</p>
 !! html/parsoid
 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
@@ -12775,9 +12573,7 @@ Templates: 2. Inside a block tag
 
 !! html+tidy
 <div>Foo</div>
-<blockquote>
-<p>Foo</p>
-</blockquote>
+<blockquote><p>Foo</p></blockquote>
 !!end
 
 !!test
@@ -12816,9 +12612,9 @@ Templates: P-wrapping: 1c. Templates on consecutive lines
 bar <div>baz</div>
 
 !! html+tidy
-<p>Foo</p>
-<p>bar</p>
-<div>baz</div>
+<p>Foo
+</p><p>
+bar </p><div>baz</div>
 !! end
 
 !!test
 <tr><td></td></tr></table>
 
 !! html+tidy
-<p>a</p>
-<table>
-<tr>
-<td></td>
-</tr>
-</table>
+
+a
+<table><tbody><tr><td></td></tr></tbody></table>
 !! end
 
 !!test
@@ -13266,14 +13059,18 @@ foo
 </div>
 <tr><td></td></tr></table>
 
-!! html+tidy
+!! html/php+tidy
 <div>
+<p>foo
+</p>
+</div><table>
+
+<tbody><tr><td></td></tr></tbody></table>
+!! html/parsoid
+<div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;/div>"}},"i":1}},"\n|}"]}'>
 <p>foo</p>
-</div>
-<table>
-<tr>
-<td></td>
-</tr>
+</div><table about="#mwt3">
+
 </table>
 !! end
 
 <div>b</div>
 <tr><td></td></tr></table>
 
-!! html+tidy
-<p>a</p>
-<div>b</div>
-<table>
-<tr>
-<td></td>
-</tr>
+!! html/php+tidy
+
+a
+<div>b</div><table>
+<tbody><tr><td></td></tr></tbody></table>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n&lt;div>b&lt;/div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
+
+
 </table>
 !! end
 
@@ -13366,7 +13165,7 @@ Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
 
 <references />
 !!html/parsoid
-<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"&lt;ref>foo&lt;/ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
+<sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"&lt;ref>foo&lt;/ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></sup><table about="#mwt2">
 <tbody>
 </tbody></table>
 
@@ -13445,78 +13244,10 @@ a<div>b{{echo|c</div>d}}e
 a<div>bc</div>de
 
 !! html+tidy
-<p>a</p>
-<div>bc</div>
-<p>de</p>
+<p>a</p><div>bc</div><p>de
+</p>
 !! end
 
-!!test
-Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
-(Parsoid-centric)
-!! options
-parsoid
-!! wikitext
-{|
-|{{echo|foo</table>}}
-|bar
-|}
-!! html
-<table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</table>"}},"i":0}},"\n|bar\n|}"]}'>
-
-<tbody>
-<tr>
-<td>foo</td></tr></tbody></table><span about="#mwt1">
-</span><span about="#mwt1">|bar</span><span about="#mwt1">
-|}</span>
-!!end
-
-!!test
-Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
-(Parsoid-centric)
-!! options
-parsoid
-!! wikitext
-<table>
-  <tr>
-    <td>
-    <table>
-      <tr>
-        <td>1. {{echo|foo </table>}}</td>
-        <td> bar </td>
-        <td>2. {{echo|baz </table>}}</td>
-      </tr>
-      <tr>
-        <td>abc</td>
-      </tr>
-    </table>
-    </td>
-  </tr>
-  <tr>
-    <td>xyz</td>
-  </tr>
-</table>
-!! html
-<table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n  <tr>\n    <td>\n    <table>\n      <tr>\n        <td>1. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo </table>"}},"i":0}},"</td>\n        <td> bar </td>\n        <td>2. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"baz </table>"}},"i":1}},"</td>\n      </tr>\n      <tr>\n        <td>abc</td>\n      </tr>\n    </table>\n    </td>\n  </tr>\n  <tr>\n    <td>xyz</td>\n  </tr>\n</table>"]}'>
-  <tbody><tr>
-    <td>
-    <table>
-      <tbody><tr>
-        <td>1. foo </td></tr></tbody></table></td>
-        <td> bar </td>
-        <td>2. baz </td></tr></tbody></table><span about="#mwt2">
-      </span><span about="#mwt2">
-      </span><span about="#mwt2">
-        </span><span about="#mwt2">abc</span><span about="#mwt2">
-      </span><span about="#mwt2">
-    </span><span about="#mwt2">
-    </span><span about="#mwt2">
-  </span><span about="#mwt2">
-  </span><span about="#mwt2">
-    </span><span about="#mwt2">xyz</span><span about="#mwt2">
-  </span><span about="#mwt2">
-</span>
-!!end
-
 !! test
 Templates: Ugly templates: 3. newline-only template parameter
 !! wikitext
@@ -14449,6 +14180,8 @@ Titles in unlinked images (T23454)
 !! html/php
 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
 </p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
 !! end
 
 !! test
@@ -14545,18 +14278,11 @@ thumbsize=220
 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
 
 !! html/php+tidy
-<p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456</p>
-<p>123</p>
-<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
-<p>456 123</p>
-<div class="thumb tright">
-<div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
-<div class="thumbcaption">
-<div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
-</div>
-</div>
-</div>
-<p>456</p>
+<p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
+</p><p>
+123</p><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div><p>456
+123</p><div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div><p>456
+</p>
 !! html/parsoid
 <p>123<figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>456</p>
 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456</p>
@@ -14703,7 +14429,7 @@ Image with link parameter, wgNoFollowLinks set to false
 [[Image:foobar.jpg|link=http://example.com/]]
 !! config
 wgNoFollowLinks=false
-!! html
+!! html/php
 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
 </p>
 !! end
@@ -14714,7 +14440,7 @@ Image with link parameter, wgNoFollowDomainExceptions
 [[Image:foobar.jpg|link=http://example.com/]]
 !! config
 wgNoFollowDomainExceptions='example.com'
-!! html
+!! html/php
 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
 </p>
 !! end
@@ -15195,7 +14921,7 @@ thumbsize=220
 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
 
 !! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
 !! end
 
 !! test
@@ -15209,7 +14935,7 @@ parsoid=wt2html,wt2wt,html2html
 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
 
 !! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
 !! end
 
 !! test
@@ -15269,7 +14995,7 @@ T3887: A RFC with a thumbnail
 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
 
 !! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink" class="external text">RFC 12354</a></figcaption></figure>
 !! end
 
 !! test
@@ -15280,7 +15006,7 @@ T3887: A mailto link with a thumbnail
 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
 
 !! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
 !! end
 
 # Pending resolution to T2368
@@ -15463,7 +15189,7 @@ T5090: External links other than http: in image captions
 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
 
 !! html/parsoid
-<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
 !! end
 
 !! test
@@ -15799,7 +15525,7 @@ T93580: 1. Templated <ref> inside block images
 
 <references />
 !! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|&lt;ref>foo&lt;/ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;ref>foo&lt;/ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|&lt;ref>foo&lt;/ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;ref>foo&lt;/ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
 
 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
 !! end
@@ -15811,7 +15537,7 @@ T93580: 2. <ref> inside inline images
 
 <references />
 !! html/parsoid
-<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: &lt;ref>foo&lt;/ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: &lt;span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid=&#39;{\"dsr\":[64,78,5,6]}&#39; data-mw=&#39;{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}&#39;>&lt;a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: &lt;ref>foo&lt;/ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: &lt;sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid=&#39;{\"dsr\":[64,78,5,6]}&#39; data-mw=&#39;{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}&#39;>&lt;a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
 
 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
 !! end
@@ -15823,7 +15549,7 @@ T93580: 3. Templated <ref> inside inline images
 
 <references />
 !! html/parsoid
-<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|&lt;ref>{{echo|foo}}&lt;/ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: &lt;span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion  mw:Extension/ref\" data-parsoid=&#39;{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&amp;lt;ref>{{echo|foo}}&amp;lt;/ref>\"}},\"i\":0}}]}&#39;>&lt;a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|&lt;ref>{{echo|foo}}&lt;/ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: &lt;sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion  mw:Extension/ref\" data-parsoid=&#39;{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&amp;lt;ref>{{echo|foo}}&amp;lt;/ref>\"}},\"i\":0}}]}&#39;>&lt;a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
 
 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
 !! end
@@ -15964,7 +15690,7 @@ Render invalid page names as plain text (T53090)
 [[.]]
 [[..]]
 [[foo././bar]]
-[[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
+[[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
 
 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
@@ -16177,7 +15903,8 @@ Bar
 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
-<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
+<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
+<link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/>
 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
 !! end
 
@@ -16943,7 +16670,7 @@ http://example.com [[File:Foobar.jpg]]
 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
 !!end
 
 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
@@ -17248,7 +16975,7 @@ http://example.com[[File:Foobar.jpg]]
 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
 !!end
 
 !! test
@@ -17357,6 +17084,20 @@ parsoid=wt2html,html2html
 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
 !! end
 
+# FIXME Parsoid doesn't actually match PHP here.
+# Probably we should use the synthetic <foo /> or <indicator>
+# extensions for this test, which are enabled when running parser tests.
+!! test
+Extension tag in attribute value
+!! wikitext
+<span title="<translate>123</translate>">ok</span>
+!! html/php+disabled
+<p>&lt;span title="&lt;translate&gt;123&lt;/translate&gt;"&gt;ok&lt;/span&gt;
+</p>
+!! html/parsoid
+<p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"&lt;translate>123&lt;/translate>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"&lt;translate typeof=\"mw:Extension/translate\" about=\"#mwt3\" data-parsoid=&apos;{\"dsr\":[13,39,2,2]}&apos; data-mw=&apos;{\"name\":\"translate\",\"attrs\":{},\"body\":{\"extsrc\":\"123\"}}&apos;>123&lt;/translate>"}]]}'>ok</span></p>
+!! end
+
 !! test
 table with multiple empty attribute values
 !! options
@@ -17464,11 +17205,9 @@ Remember AT&T?
 text with character entity: eacute
 !! wikitext
 I always thought &eacute; was a cute letter.
-!! html
+!! html+tidy
 <p>I always thought &#233; was a cute letter.
 </p>
-!! html+tidy
-<p>I always thought é was a cute letter.</p>
 !! end
 
 !! test
@@ -17546,12 +17285,11 @@ Ensure that HTML adoption agency algorithm is properly implemented.
 !! end
 
 # This was T43545 in the PHP parser.
-# Note that tidy doesn't handle this correctly.
 !! test
 Nesting of <kbd>
 !! wikitext
 <kbd>X<kbd>Y</kbd>Z</kbd>
-!! html
+!! html+tidy
 <p><kbd>X<kbd>Y</kbd>Z</kbd>
 </p>
 !! end
@@ -17560,22 +17298,20 @@ Nesting of <kbd>
 # Note that there are some other nestable tags (b, i, etc) which are
 # not covered; see T53081 for discussion.
 
-# Note that tidy doesn't handle this correctly.
 !! test
 Nesting of <em>
 !! wikitext
 <em>X<em>Y</em>Z</em>
-!! html
+!! html+tidy
 <p><em>X<em>Y</em>Z</em>
 </p>
 !! end
 
-# Note that tidy doesn't handle this correctly.
 !! test
 Nesting of <strong>
 !! wikitext
 <strong>X<strong>Y</strong>Z</strong>
-!! html
+!! html+tidy
 <p><strong>X<strong>Y</strong>Z</strong>
 </p>
 !! end
@@ -17585,10 +17321,10 @@ Nesting of <q>
 !! wikitext
 <q>X<q>Y</q>Z</q>
 !! html+tidy
-<p><q>X<q>Y</q>Z</q></p>
+<p><q>X<q>Y</q>Z</q>
+</p>
 !! end
 
-# Note that tidy doesn't handle this correctly.
 !! test
 Nesting of <ruby>
 !! wikitext
@@ -17598,7 +17334,6 @@ Nesting of <ruby>
 </p>
 !! end
 
-# Note that tidy doesn't handle this correctly.
 !! test
 Nesting of <bdo>
 !! wikitext
@@ -17643,6 +17378,7 @@ Media link with text
 
 # FIXME: this is still bad HTML tag nesting
 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
+# Parsoid & Remex fix the p-wrapping since they operate on the DOM.
 !! test
 Media link with nasty text
 !! wikitext
@@ -18256,11 +17992,12 @@ Expansion of multi-line templates in attribute values (T8255 sanity check 2)
 !! end
 
 !! test
-Tags which are hidden from Tidy cannot pass through the Sanitizer
+Tags which are hidden from tidiers cannot pass through the Sanitizer
 !! wikitext
 <mw:toc><script>alert();</script></mw:toc>
 !! html+tidy
-<p>&lt;mw:toc&gt;&lt;script&gt;alert();&lt;/script&gt;&lt;/mw:toc&gt;</p>
+<p>&lt;mw:toc&gt;&lt;script&gt;alert();&lt;/script&gt;&lt;/mw:toc&gt;
+</p>
 !! end
 
 ###
@@ -18565,14 +18302,14 @@ Nested template calls
 ### Sanitizer
 ###
 
-# HTML+Tidy strips out empty tags completely. Parsoid doesn't.
-# FIXME: Wikitext for this first test doesn't match its title.
+# Remex wraps empty tag runs with p-tags.
+# Parsoid strips them out during p-wrapping.
 !! test
 Sanitizer: Closing of open tags
 !! wikitext
 <s></s><table></table>
 !! html/php+tidy
-
+<p><s></s></p><table></table>
 !! html/parsoid
 <s></s><table></table>
 !! end
@@ -18593,6 +18330,8 @@ parsoid=wt2html
 !! wikitext
 </s>
 !! html/php+tidy
+<p class="mw-empty-elt">
+</p>
 !! html/parsoid
 !! end
 
@@ -18602,10 +18341,9 @@ Sanitizer: Closing of closed but not open table tags
 parsoid=wt2html
 !! wikitext
 Table not started</td></tr></table>
-!! html/php+tidy
-<p>Table not started</p>
-!! html/parsoid
-<p>Table not started</p>
+!! html+tidy
+<p>Table not started
+</p>
 !! end
 
 !! test
@@ -18763,7 +18501,7 @@ language=sr variant=sr-el
 !! html/parsoid
 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
 
-<p><span class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></span></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
 !! end
 
 !! test
@@ -18776,10 +18514,6 @@ Self closed html pairs (T7487)
 <div><font id="bug2"></font>In div text</div>
 !! end
 
-#
-#
-#
-
 !! test
 Punctuation: nbsp before exclamation
 !! wikitext
@@ -18837,9 +18571,9 @@ HTML bullet list, unclosed tags (T7497)
 </ul>
 !! html/php+tidy
 <ul>
-<li>One</li>
-<li>Two</li>
-</ul>
+<li>One
+</li><li>Two
+</li></ul>
 !! html/parsoid
 <ul data-parsoid='{"stx":"html"}'>
 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
@@ -18879,9 +18613,9 @@ HTML ordered list, unclosed tags (T7497)
 </ol>
 !! html/php+tidy
 <ol>
-<li>One</li>
-<li>Two</li>
-</ol>
+<li>One
+</li><li>Two
+</li></ol>
 !! html/parsoid
 <ol data-parsoid='{"stx":"html"}'>
 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
@@ -18936,30 +18670,15 @@ HTML nested bullet list, open tags (T7497)
 <li>Sub-two
 </ul>
 </ul>
-!! html/php+tidy
-<ul>
-<li>One</li>
-<li>Two:
-<ul>
-<li>Sub-one</li>
-<li>Sub-two</li>
-</ul>
-</li>
-</ul>
-!! html/parsoid
+!! html+tidy
 <ul>
 <li>One
-</li>
-<li>Two:
+</li><li>Two:
 <ul>
 <li>Sub-one
-</li>
-<li>Sub-two
-</li>
-</ul>
-</li>
-</ul>
-
+</li><li>Sub-two
+</li></ul>
+</li></ul>
 !! end
 
 !! test
@@ -19056,11 +18775,11 @@ mailto:inline@mail.tld
 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://first/"></a> <a rel="mw:ExtLink" href="http://second"></a> <a rel="mw:ExtLink" href="ftp://ftp"></a></p>
-<p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
-<p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
-<p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
-<p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
+<p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
+<p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
 !! end
 
 
@@ -19102,20 +18821,15 @@ http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>C
 
 
 !! html/php+tidy
-<h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
-<p>http://</p>
-<div id="toc" class="toc">
-<div class="toctitle" lang="en" dir="ltr" xml:lang="en">
-<h2>Contents</h2>
-</div>
+<h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2><p>
+http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
 </ul>
 </div>
-<p></p>
 !! html/parsoid
 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span> onmouseover= </h2>
-<p><a rel="mw:ExtLink" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
 !! end
 
 !! test
@@ -19144,31 +18858,22 @@ parsoid=wt2html,html2html
 !! end
 
 # Known to produce bogus xml (extra </td>)
+# Don't add the html/php section since it generates broken HTML
 !! test
 Fuzz testing: Parser16
 !! wikitext
 {|
 !https://||||||
-!! html
+!! html+tidy
 <table>
-<tr>
+<tbody><tr>
 <th>https://</th>
 <th></th>
 <th></th>
 <th>
-</td>
-</tr>
-</table>
 
-!! html+tidy
-<table>
-<tr>
-<th>https://</th>
-<th></th>
-<th></th>
-<th></th>
-</tr>
-</table>
+</th></tr>
+</tbody></table>
 !! end
 
 !! test
@@ -19273,7 +18978,7 @@ http://example.com <nowiki>junk</nowiki>
 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
 !! end
 
 !!test
@@ -19284,7 +18989,7 @@ http://example.com<nowiki>junk</nowiki>
 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
 !! end
 
 !! test
@@ -19295,12 +19000,9 @@ http://example.com<pre>junk</pre>
 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
 
 !! html/php+tidy
-<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
-<pre>
-junk
-</pre>
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
 !! end
 
 !! test
@@ -20359,7 +20061,7 @@ Handling of &#x0A; in URLs
 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
 
 !! html/parsoid
-<ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&amp;#x0A;a"}}'>irc://%0Aa</a></li></ul></li></ul>
+<ul><li><ul><li> <a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&amp;#x0A;a"}}'>irc://%0Aa</a></li></ul></li></ul>
 !! end
 
 !! test
@@ -20370,7 +20072,7 @@ Handling of %0A in URLs
 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
 
 !! html/parsoid
-<ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
+<ul><li><ul><li> <a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
 !! end
 
 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
@@ -20573,7 +20275,7 @@ image4    |300px| centre
 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image2.gif"><img resource="./File:Image2.gif" src="./Special:FilePath/Image2.gif" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
-<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" href="http://///////">http://///////</a></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" class="external free" href="http://///////">http://///////</a></div></li>
 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
 </ul>
 !! end
@@ -20975,7 +20677,7 @@ File:Foobar.jpg|alt=galleryalt|link=Wikilink
 </ul>
 
 !! html/parsoid
-<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-parsoid='{"dsr":[0,70,2,2]}' data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Wikilink"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
 </ul>
 !! end
@@ -21009,11 +20711,11 @@ File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
 Gallery override link with absolute external link with LanguageConverter
 !! options
 language=zh
-!! input
+!! wikitext
 <gallery>
 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
 </gallery>
-!! result
+!! html/php
 <ul class="gallery mw-gallery-traditional">
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
@@ -21024,6 +20726,10 @@ File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
                </div></li>
 </ul>
 
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n"}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
+</ul>
 !! end
 
 !! test
@@ -21156,8 +20862,6 @@ parsoid=wt2html,wt2wt,html2html
 !! html/php
 <p>&#x4a;&#x61;&#x76;&#x61;&#x53;&#x63;&#114;&#x69;&#112;&#x74;
 </p>
-!! html/php+tidy
-<p>JavaScript</p>
 !! html/parsoid
 <p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
 !! end
@@ -21166,11 +20870,9 @@ parsoid=wt2html,wt2wt,html2html
 HTML Hex character encoding bogus encoding (T28437 regression check)
 !! wikitext
 &#xsee;&#XSEE;
-!! html/php
+!! html
 <p>&amp;#xsee;&amp;#XSEE;
 </p>
-!! html/parsoid
-<p>&amp;#xsee;&amp;#XSEE;</p>
 !! end
 
 !! test
@@ -21182,8 +20884,6 @@ parsoid=wt2html,wt2wt,html2html
 !! html/php
 <p>&#xee;&#xee;
 </p>
-!! html/php+tidy
-<p>îî</p>
 !! html/parsoid
 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
 !! end
@@ -21202,22 +20902,20 @@ Illegal character references (T106578)
 ; Surrogate: &#xD83D;&#xDCA9;
 ; This is an okay astral character: &#x1F4A9;
 !! html+tidy
-<dl>
-<dt>Null</dt>
-<dd>&amp;#00;</dd>
-<dt>FF</dt>
-<dd>&amp;#xC;</dd>
-<dt>CR</dt>
-<dd>&amp;#xD;</dd>
-<dt>Control (low)</dt>
-<dd>&amp;#8;</dd>
-<dt>Control (high)</dt>
-<dd>&amp;#x7F; &amp;#x9F;</dd>
-<dt>Surrogate</dt>
-<dd>&amp;#xD83D;&amp;#xDCA9;</dd>
-<dt>This is an okay astral character</dt>
-<dd>💩</dd>
-</dl>
+<dl><dt> Null</dt>
+<dd> &amp;#00;</dd>
+<dt> FF</dt>
+<dd> &amp;#xC;</dd>
+<dt> CR</dt>
+<dd> &amp;#xD;</dd>
+<dt> Control (low)</dt>
+<dd> &amp;#8;</dd>
+<dt> Control (high)</dt>
+<dd> &amp;#x7F; &amp;#x9F;</dd>
+<dt> Surrogate</dt>
+<dd> &amp;#xD83D;&amp;#xDCA9;</dd>
+<dt> This is an okay astral character</dt>
+<dd> &#x1f4a9;</dd></dl>
 !! end
 
 !! test
@@ -21234,11 +20932,9 @@ __FORCETOC__
 ISBN code coverage
 !! wikitext
 ISBN  978-0-1234-56&#x20;789
-!! html
+!! html/php
 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a>&#x20;789
 </p>
-!! html+tidy
-<p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
 !! html/parsoid
 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x20;","srcContent":" "}'> </span>789</p>
 !! end
@@ -21309,7 +21005,7 @@ T24905: <abbr> followed by ISBN followed by </a>
 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
 </p>
 !! html/parsoid
-<p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
+<p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" class="external text" href="http://www.example.com">example.com</a></p>
 !! end
 
 !! test
@@ -21334,66 +21030,78 @@ RFC [[RFC 1234]]
 RFC code coverage
 !! wikitext
 RFC   983&#x20;987
-!! html
+!! html/php
 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a>&#x20;987
 </p>
-!! html+tidy
-<p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
+!! html/parsoid
+<p><a href="https://tools.ietf.org/html/rfc983" rel="mw:ExtLink" class="external text" data-parsoid='{"stx":"magiclink"}'>RFC   983</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x20;","srcContent":" "}'> </span>987</p>
 !! end
 
 !! test
 Centre-aligned image
 !! wikitext
 [[Image:foobar.jpg|centre]]
-!! html
+!! html/php
 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
 
-!!end
+!! html/parsoid
+<figure class="mw-default-size mw-halign-center" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"center","ak":"centre"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
+!! end
 
 !! test
 None-aligned image
 !! wikitext
 [[Image:foobar.jpg|none]]
-!! html
+!! html/php
 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
 
-!!end
+!! html/parsoid
+<figure class="mw-default-size mw-halign-none" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
+!! end
 
 !! test
 Width + Height sized image (using px) (height is ignored)
 !! wikitext
 [[Image:foobar.jpg|640x480px]]
-!! html
+!! html/php
 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
 </p>
-!!end
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640x480px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!! end
 
 !! test
 Width-sized image (using px, no following whitespace)
 !! wikitext
 [[Image:foobar.jpg|640px]]
-!! html
+!! html/php
 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
 </p>
-!!end
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!! end
 
 !! test
 Width-sized image (using px, with following whitespace - test regression from r39467)
 !! wikitext
 [[Image:foobar.jpg|640px ]]
-!! html
+!! html/php
 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
 </p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px "}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
 !!end
 
 !! test
 Width-sized image (using px, with preceding whitespace - test regression from r39467)
 !! wikitext
 [[Image:foobar.jpg| 640px]]
-!! html
+!! html/php
 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
 </p>
-!!end
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":" 640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!! end
 
 !! test
 Image with page parameter
@@ -21439,7 +21147,7 @@ Images with the "|" character in the comment
 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&amp;param2=%7Cx">external</a> URL</div></div></div>
 
 !! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=%7Cleft%7C&amp;param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&amp;param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&amp;param2=|x"}}'>external</a> URL</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" class="external text" href="http://test/?param1=%7Cleft%7C&amp;param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&amp;param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&amp;param2=|x"}}'>external</a> URL</figcaption></figure>
 !! end
 
 !! test
@@ -22588,7 +22296,7 @@ Nested raw: -{R|nested {{echo|hi}} templates}-
 Strings evaluating false shouldn't be ignored by Language converter (T51072)
 !! options
 language=zh variant=zh-cn
-!! input
+!! wikitext
 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
 !! html/php
 <p>0
@@ -22601,7 +22309,7 @@ language=zh variant=zh-cn
 Conversion rules from [numeric-only string] to [something else] (T48634)
 !! options
 language=zh variant=zh-cn
-!! input
+!! wikitext
 -{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345
 !! html/php
 <p>D12345EE12345
@@ -22614,7 +22322,7 @@ language=zh variant=zh-cn
 Two-way converter rule entries with an empty value should be ignored (T53551)
 !! options
 language=zh variant=zh-cn
-!! input
+!! wikitext
 -{H|zh-cn:foo;zh-tw:;}-foobar
 !! html/php
 <p>foobar
@@ -22627,7 +22335,7 @@ language=zh variant=zh-cn
 One-way converter rule entries with an empty "from" string should be ignored (T53551)
 !! options
 language=zh variant=zh-cn
-!! input
+!! wikitext
 -{H|=>zh-cn:foo;}-foobar
 !! html/php
 <p>foobar
@@ -22640,7 +22348,7 @@ language=zh variant=zh-cn
 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
 !! options
 language=zh variant=zh-cn
-!! input
+!! wikitext
 -{H|}-foobar
 !! html/php
 <p>foobar
@@ -22702,10 +22410,10 @@ language=zh variant=zh-cn
 
 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
 !! html/php+tidy
-<p><span>ab</span></p>
-<div><span>cd <span>ab</span></span>
-<div><span>cd <span>ad</span></span></div>
-</div>
+<span>ab<div>cd
+<span>ab<div>cd
+<span>ad
+</span></div></span></div></span>
 !! html/parsoid
 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b&lt;div data-parsoid=&#39;{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}&#39;>c&lt;/div>"}}'></div><p>d</p>
 
@@ -22831,13 +22539,13 @@ gopher://www.google.com
 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
-<a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
-<a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
-<a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
-<a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
-<a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
-<a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
+<a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
+<a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
+<a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
+<a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
+<a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
+<a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
 !! end
 
 !! test
@@ -22991,10 +22699,9 @@ language=zh variant=zh-cn
 ;<b>foo:bar
 ;-{zh-cn:AAA
 !! html/php+tidy
-<dl>
-<dt><b>foo:bar</b></dt>
-<dt><b>-{zh-cn:AAA</b></dt>
-</dl>
+<dl><dt><b>foo:bar</b></dt><b>
+<dt>-{zh-cn:AAA</dt></b></dl><p><b>
+</b></p>
 !! html/parsoid
 <dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
@@ -23171,14 +22878,8 @@ T2529: Uncovered bullet
 
 !! end
 
-# Plain MediaWiki does not remove empty lists, but tidy actually does.
-# Templates in Wikipedia rely on this behavior, as tidy has always been
-# enabled there. These tests are normally run *without* tidy, so specify the
-# full output here. 
-# To test realistic parsing behavior, apply a tidy-like transformation to both
-# the expected output and your parser's output.
 !! test
-T2529: Uncovered bullet leaving empty list, normally removed by tidy
+T2529: Uncovered bullet in a deeply nested list
 !! wikitext
 ******* Foo {{bullet}}
 !! html
@@ -23369,14 +23070,17 @@ Line two
 
 !! end
 
+# doBlockLevels screws up this output and Remex cleans up as much as it can.
+# Parsoid seems to do a better job here since its p-wrapper is probably smarter.
 !! test
 Nesting tags, paragraphs on lines which begin with <div>
 !! wikitext
 <div></div><strong>A
 B</strong>
 !! html/php+tidy
-<p><strong>A</strong></p>
-<p><strong>B</strong></p>
+<div></div><p><strong>A
+</strong></p><strong></strong><p><strong>B</strong>
+</p>
 !! html/parsoid
 <div></div>
 <p><strong>A
@@ -23396,9 +23100,8 @@ Line two</blockquote>
 Line two</blockquote>
 
 !! html+tidy
-<blockquote>
-<p>Line one Line two</p>
-</blockquote>
+<blockquote><p>Line one
+Line two</p></blockquote>
 !! end
 
 !! test
@@ -23416,8 +23119,9 @@ Line two</blockquote>
 
 !! html+tidy
 <blockquote>
-<p>Line one</p>
-Line two</blockquote>
+<p>Line one
+</p><p>
+Line two</p></blockquote>
 !! end
 
 !! test
@@ -23434,9 +23138,9 @@ Line two
 </blockquote>
 
 !! html+tidy
-<blockquote>
-<p>Line one</p>
-<p>Line two</p>
+<blockquote><p>Line one
+</p><p>Line two
+</p>
 </blockquote>
 !! end
 
@@ -23455,13 +23159,9 @@ Line two
 </p>
 </blockquote>
 
-!! html+tidy
-<blockquote>
-<p>Line one</p>
-<p>Line two</p>
-</blockquote>
 !! end
 
+# FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
 !! test
 Paragraphs inside blockquotes/divs (no extra line breaks)
 !! wikitext
@@ -23540,9 +23240,11 @@ wgLinkHolderBatchSize=0
 Free external link invading image caption
 !! wikitext
 [[Image:Foobar.jpg|thumb|http://x|hello]]
-!! html
+!! html/php
 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
 
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"bogus","ak":"http://x"},{"ck":"caption","ak":"hello"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a><figcaption>hello</figcaption></figure>
 !! end
 
 !! test
@@ -23555,25 +23257,29 @@ language=fa
 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
 !! end
 
 !! test
 Multibyte character in padleft
 !! wikitext
 {{padleft:-Hello|7|Æ}}
-!! html
+!! html/php
 <p>Æ-Hello
 </p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
 !! end
 
 !! test
 Multibyte character in padright
 !! wikitext
 {{padright:Hello-|7|Æ}}
-!! html
+!! html/php
 <p>Hello-Æ
 </p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
 !! end
 
 !!test
@@ -24369,21 +24075,13 @@ __TOC__
 <h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
 !! html/php+tidy
-<p></p>
-<div id="toc" class="toc">
-<div class="toctitle" lang="en" dir="ltr" xml:lang="en">
-<h2>Contents</h2>
-</div>
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
 </ul>
 </div>
-<p></p>
-<h2><span class="mw-headline" id="Quote"></span></h2>
-<blockquote>
-<p><span class="mw-headline" id="Quote">Quote</span></p>
-</blockquote>
-<p><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></p>
+
+<h2><span class="mw-headline" id="Quote"><blockquote><p>Quote</p></blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 !! html/parsoid
 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
 <h2 id="Quote" data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
@@ -24437,23 +24135,15 @@ __TOC__
 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
 !! html/php+tidy
-<p></p>
-<div id="toc" class="toc">
-<div class="toctitle" lang="en" dir="ltr" xml:lang="en">
-<h2>Contents</h2>
-</div>
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
 </ul>
 </div>
-<p></p>
+
 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
-<h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
-<blockquote>
-<p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
-</blockquote>
-<p><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></p>
+<h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote><p>Bar</p></blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 !! html/parsoid
 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
 <h2 id="Foo_Bar" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
@@ -24567,9 +24257,6 @@ __TOC__
 <h2 id="test_test_test" data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
 !! end
 
-# Note that the html output does not have the <p></p>, but the
-# html+tidy output *does*.  This is because the empty <p></p> is
-# removed by the sanitizer, but only when tidy is *not* enabled (!).
 !! test
 Empty <p> tag in TOC, removed by Sanitizer (T92892)
 !! wikitext
@@ -24584,18 +24271,6 @@ __TOC__
 
 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
-!! html/php+tidy
-<p></p>
-<div id="toc" class="toc">
-<div class="toctitle" lang="en" dir="ltr" xml:lang="en">
-<h2>Contents</h2>
-</div>
-<ul>
-<li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
-</ul>
-</div>
-<p></p>
-<h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 !! html/parsoid
 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
 <h2 id="x" data-parsoid='{}'> x </h2>
@@ -24774,15 +24449,46 @@ Language parser function
 </p>
 !! end
 
+!!test
+Padleft and padright (default 0-padding)
+!! wikitext
+{{padleft:xyz|5}}
+{{padright:xyz|5}}
+!! html/php
+<p>00xyz
+xyz00
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
+!! end
+
+!!test
+Padleft and padright (partial fill)
+!! wikitext
+{{padleft:xyz|6|ab}}
+{{padright:xyz|6|ab}}
+!! html/php
+<p>abaxyz
+xyzaba
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>abaxyz</span>
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>xyzaba</span></p>
+!! end
+
 !!test
 Padleft and padright as substr
 !! wikitext
 {{padleft:|3|abcde}}
 {{padright:|3|abcde}}
-!! html
+!! html/php
 <p>abc
 abc
 </p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:","function":"padleft"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span>
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:","function":"padright"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span></p>
 !! end
 
 !!test
@@ -24806,7 +24512,7 @@ T36939 - Case insensitive link parsing ([HttP://])
 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
 !! end
 
 !!test
@@ -24826,7 +24532,7 @@ HttP://MediaWiki.Org/
 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
 !! end
 
 !!test
 
 !! end
 
+!! test
+Headings: Used as horizontal rule
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! options
+parsoid=wt2html
+!! wikitext
+===============
+!! html/php
+<h6><span id=".3D.3D.3D"></span><span class="mw-headline" id="===">===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: ===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+
+!! html/parsoid
+<h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
+!! end
+
 #### --------------- Lists ---------------
 #### 0. Outside nests (*foo, etc.)
 #### 1. Nested inside html <ul><li>*foo</li></ul>
@@ -25669,15 +25390,12 @@ parsoid=html2wt
 |}
 !! html/php+tidy
 <table>
+<tbody><tr>
+<td>foo|bar
+</td></tr>
 <tr>
-<td>foo|bar</td>
-</tr>
-<tr>
-<td>x
-<div>a|b</div>
-</td>
-</tr>
-</table>
+<td>x<div>a|b</div>
+</td></tr></tbody></table>
 !! end
 
 !! test
@@ -26786,8 +26504,8 @@ parsoid=wt2html,html2html
 !! wikitext
 <div title="Hello world />Foo
 !! html/php+tidy
-<div title="Hello world"></div>
-<p>Foo</p>
+<div title="Hello world"></div><p>Foo
+</p>
 !! html/parsoid
 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
 !! end
@@ -26929,11 +26647,9 @@ RT-ed inter-element separators should be valid separators
 </tbody></table>
 !!end
 
-# Parsoid-only since PHP parser relies on Tidy for correct output
+# Parsoid-only test of a DOM pass
 !!test
 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
-!!options
-parsoid
 !! wikitext
 {|
 |<small>foo
@@ -26943,7 +26659,7 @@ bar
 {|
 |<small>foo<small>
 |}
-!! html
+!! html/parsoid
 <table>
 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
 <p>bar</p></small></td></tr>
@@ -28515,7 +28231,7 @@ WTS of autolinks with nowikis (round-trip)
 !! wikitext
 x<nowiki/>http://cscott.net<nowiki/>x
 !! html/parsoid
-<p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
+<p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
 !! end
 
 # this is the "easy" test because it leaves in place all the
@@ -28583,18 +28299,25 @@ Magic links inside links (not autolinked)
 [http://foo.com PMID 1234]
 [http://foo.com ISBN 123456789x]
 !! html+tidy
-<p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
-<p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
+<p><a href="/wiki/Foo" title="Foo">http://example.com</a>
+<a href="/wiki/Foo" title="Foo">RFC 1234</a>
+<a href="/wiki/Foo" title="Foo">PMID 1234</a>
+<a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
+</p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
+<a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
+<a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
+<a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
+</p>
 !! html/parsoid
 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
 
-<p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
-<a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
-<a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
-<a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
+<a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
+<a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
+<a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
 !! end
 
 !! test
@@ -28605,38 +28328,14 @@ Magic links inside image captions (autolinked)
 [[File:Foobar.jpg|thumb|PMID 1234]]
 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
 !! html+tidy
-<div class="thumb tright">
-<div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
-<div class="thumbcaption">
-<div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
-</div>
-</div>
-<div class="thumb tright">
-<div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
-<div class="thumbcaption">
-<div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
-<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div>
-</div>
-</div>
-<div class="thumb tright">
-<div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
-<div class="thumbcaption">
-<div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
-<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
-</div>
-</div>
-<div class="thumb tright">
-<div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
-<div class="thumbcaption">
-<div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
-<a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
-</div>
-</div>
-!! html/parsoid
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
-<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external text">RFC 1234</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></figcaption></figure>
 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
 !! end
 
@@ -28706,24 +28405,27 @@ parsoid=html2wt,wt2wt
 |}
 !! html/php+tidy
 <table>
+<tbody><tr>
+<th>-
+</th>
+<th>-
+</th></tr>
 <tr>
-<th>-</th>
-<th>-</th>
-</tr>
-<tr>
-<td>-</td>
-<td>-</td>
-</tr>
+<td>-
+</td>
+<td>- 
+</td></tr>
 <tr>
-<td><small>-</small></td>
-<td><br />
-<p>-</p>
+<td><small>-</small>
 </td>
 <td><br />
-<p>-</p>
+<p>-
+</p>
 </td>
-</tr>
-</table>
+<td><br />
+<p>-
+</p>
+</td></tr></tbody></table>
 !! end
 
 !! test
@@ -28907,7 +28609,7 @@ parsoid=wt2html
 !! wikitext
 {{echo|hi}}[http://example.com [[ho]]]
 !! html/parsoid
-<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
 !! end
 
 !! test
@@ -29865,13 +29567,11 @@ Empty LI (T49673)
 * 
 *
 * b
-!! html/php+tidy
-<ul>
-<li>a</li>
-<li class="mw-empty-elt"></li>
+!! html+tidy
+<ul><li> a</li>
+<li class="mw-empty-elt"> </li>
 <li class="mw-empty-elt"></li>
-<li>b</li>
-</ul>
+<li> b</li></ul>
 !! end
 
 !! test
@@ -29879,13 +29579,9 @@ Thumbnail output
 !! wikitext
 [[File:Thumb.png|thumb]]
 !! html/php+tidy
-<div class="thumb tright">
-<div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
-<div class="thumbcaption">
-<div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
-</div>
-</div>
-</div>
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></figure>
 !! end
 
 !! test
@@ -30250,8 +29946,8 @@ T51672: Test for brackets in attributes of elements in external link texts
 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with &#91;brackets&#93;">span</span></a>
 </p>
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
-<a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &amp;#91;brackets&amp;#93;"}}'>span</span></a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
+<a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &amp;#91;brackets&amp;#93;"}}'>span</span></a></p>
 !! end
 
 !! test